diff options
author | Pratik R. Sampat <psampat@linux.ibm.com> | 2021-07-08 14:49:11 +0530 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2021-07-19 20:34:09 +0530 |
commit | 1daaf0ee564e3edb5964fbd2877a293088656820 (patch) | |
tree | 808476d964bbf9860286d83576afe5e258f3730b | |
parent | 54634c4e6f556b19c1bed024ccf0acf2e6346300 (diff) | |
download | skiboot-1daaf0ee564e3edb5964fbd2877a293088656820.zip skiboot-1daaf0ee564e3edb5964fbd2877a293088656820.tar.gz skiboot-1daaf0ee564e3edb5964fbd2877a293088656820.tar.bz2 |
powercap: occ: Set occ_set_powercap as const attribute
The commit fixes the compile time warning suggestion of setting
occ_set_powercap as a candiate for the attribute 'const'.
Fixes: c6aabe3f2eb5 (powercap: occ: Add a generic powercap framework)
Signed-off-by: Pratik R. Sampat <psampat@linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r-- | hw/occ.c | 2 | ||||
-rw-r--r-- | include/powercap.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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 */ |