* [PATCH -next] w1: ds1wm: Remove set but not used variable 'inten'
@ 2021-05-29 3:59 Baokun Li
2021-06-15 1:59 ` libaokun (A)
0 siblings, 1 reply; 2+ messages in thread
From: Baokun Li @ 2021-05-29 3:59 UTC (permalink / raw)
To: zbr, linux-kernel
Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/w1/masters/ds1wm.c: In function 'ds1wm_probe':
drivers/w1/masters/ds1wm.c:512:5: warning:
variable ‘inten’ set but not used [-Wunused-but-set-variable]
It never used since introduction.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
drivers/w1/masters/ds1wm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c
index f661695fb589..f59d92865ecb 100644
--- a/drivers/w1/masters/ds1wm.c
+++ b/drivers/w1/masters/ds1wm.c
@@ -509,7 +509,6 @@ static int ds1wm_probe(struct platform_device *pdev)
struct ds1wm_driver_data *plat;
struct resource *res;
int ret;
- u8 inten;
if (!pdev)
return -ENODEV;
@@ -564,7 +563,7 @@ static int ds1wm_probe(struct platform_device *pdev)
ds1wm_data->reset_recover_delay = plat->reset_recover_delay;
/* Mask interrupts, set IAS before claiming interrupt */
- inten = ds1wm_read_register(ds1wm_data, DS1WM_INT_EN);
+ ds1wm_read_register(ds1wm_data, DS1WM_INT_EN);
ds1wm_write_register(ds1wm_data,
DS1WM_INT_EN, ds1wm_data->int_en_reg_none);
--
2.25.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next] w1: ds1wm: Remove set but not used variable 'inten'
2021-05-29 3:59 [PATCH -next] w1: ds1wm: Remove set but not used variable 'inten' Baokun Li
@ 2021-06-15 1:59 ` libaokun (A)
0 siblings, 0 replies; 2+ messages in thread
From: libaokun (A) @ 2021-06-15 1:59 UTC (permalink / raw)
To: zbr, linux-kernel; +Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3
ping
在 2021/5/29 11:59, Baokun Li 写道:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/w1/masters/ds1wm.c: In function 'ds1wm_probe':
> drivers/w1/masters/ds1wm.c:512:5: warning:
> variable ‘inten’ set but not used [-Wunused-but-set-variable]
>
> It never used since introduction.
>
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
> ---
> drivers/w1/masters/ds1wm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c
> index f661695fb589..f59d92865ecb 100644
> --- a/drivers/w1/masters/ds1wm.c
> +++ b/drivers/w1/masters/ds1wm.c
> @@ -509,7 +509,6 @@ static int ds1wm_probe(struct platform_device *pdev)
> struct ds1wm_driver_data *plat;
> struct resource *res;
> int ret;
> - u8 inten;
>
> if (!pdev)
> return -ENODEV;
> @@ -564,7 +563,7 @@ static int ds1wm_probe(struct platform_device *pdev)
> ds1wm_data->reset_recover_delay = plat->reset_recover_delay;
>
> /* Mask interrupts, set IAS before claiming interrupt */
> - inten = ds1wm_read_register(ds1wm_data, DS1WM_INT_EN);
> + ds1wm_read_register(ds1wm_data, DS1WM_INT_EN);
> ds1wm_write_register(ds1wm_data,
> DS1WM_INT_EN, ds1wm_data->int_en_reg_none);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-15 2:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-29 3:59 [PATCH -next] w1: ds1wm: Remove set but not used variable 'inten' Baokun Li
2021-06-15 1:59 ` libaokun (A)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®