[SRU][F:linux-bluefield][PATCH v1 1/1] UBUNTU: SAUCE: pwr-mlxbf.c: make hids local variables
Asmaa Mnebhi
asmaa at nvidia.com
Tue Jul 5 20:16:27 UTC 2022
Buglink: https://bugs.launchpad.net/bugs/1980774
Both rst_pwr_hid and low_pwr_hid are only used in a single
function so they should be local variables.
Signed-off-by: Asmaa Mnebhi <asmaa at nvidia.com>
---
drivers/power/reset/pwr-mlxbf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/power/reset/pwr-mlxbf.c b/drivers/power/reset/pwr-mlxbf.c
index 0bad4178ab40..40cd71338010 100644
--- a/drivers/power/reset/pwr-mlxbf.c
+++ b/drivers/power/reset/pwr-mlxbf.c
@@ -17,9 +17,6 @@
#define DRV_VERSION "1.1"
-const char *rst_pwr_hid = "MLNXBF24";
-const char *low_pwr_hid = "MLNXBF29";
-
struct pwr_mlxbf {
struct work_struct send_work;
const char *hid;
@@ -32,6 +29,8 @@ static void pwr_mlxbf_send_work(struct work_struct *work)
static irqreturn_t pwr_mlxbf_irq(int irq, void *ptr)
{
+ const char *rst_pwr_hid = "MLNXBF24";
+ const char *low_pwr_hid = "MLNXBF29";
struct pwr_mlxbf *priv = ptr;
if (!strncmp(priv->hid, rst_pwr_hid, 8))
--
2.30.1
More information about the kernel-team
mailing list