aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/occ.c2
-rw-r--r--include/powercap.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/occ.c b/hw/occ.c
index a1e4982..b09b76d 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -1512,7 +1512,7 @@ static struct opal_occ_cmd_data pcap_data = {
.cmd = OCC_CMD_SET_POWER_CAP,
};
-int occ_set_powercap(u32 handle, int token, u32 pcap)
+int __attribute__((__const__)) occ_set_powercap(u32 handle, int token, u32 pcap)
{
struct occ_dynamic_data *ddata;
struct proc_chip *chip;
diff --git a/include/powercap.h b/include/powercap.h
index 3340ab7..e472191 100644
--- a/include/powercap.h
+++ b/include/powercap.h
@@ -25,6 +25,6 @@ enum powercap_class {
/* Powercap OCC interface */
int occ_get_powercap(u32 handle, u32 *pcap);
-int occ_set_powercap(u32 handle, int token, u32 pcap);
+int __attribute__((__const__)) occ_set_powercap(u32 handle, int token, u32 pcap);
#endif /* __POWERCAP_H */