Commit a578cc3a authored by Tom Rix's avatar Tom Rix Committed by Sebastian Reichel

power: reset: pwr-mlxbf: change rst_pwr_hid and low_pwr_hid from global to local variables

sparse reports
drivers/power/reset/pwr-mlxbf.c:19:12: warning: symbol 'rst_pwr_hid' was not declared. Should it be static?
drivers/power/reset/pwr-mlxbf.c:20:12: warning: symbol 'low_pwr_hid' was not declared. Should it be static?

Both rst_pwr_hid and low_pwr_hid are only used in a single function
so they should be local variables.

Fixes: a4c0094f ("power: reset: pwr-mlxbf: add BlueField SoC power control driver")
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Acked-by: default avatarAsmaa Mnebhi <asmaa@nvidia.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent a5a3d94f
...@@ -16,9 +16,6 @@ ...@@ -16,9 +16,6 @@
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/types.h> #include <linux/types.h>
const char *rst_pwr_hid = "MLNXBF24";
const char *low_pwr_hid = "MLNXBF29";
struct pwr_mlxbf { struct pwr_mlxbf {
struct work_struct send_work; struct work_struct send_work;
const char *hid; const char *hid;
...@@ -31,6 +28,8 @@ static void pwr_mlxbf_send_work(struct work_struct *work) ...@@ -31,6 +28,8 @@ static void pwr_mlxbf_send_work(struct work_struct *work)
static irqreturn_t pwr_mlxbf_irq(int irq, void *ptr) 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; struct pwr_mlxbf *priv = ptr;
if (!strncmp(priv->hid, rst_pwr_hid, 8)) if (!strncmp(priv->hid, rst_pwr_hid, 8))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment