All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mvsas: Remove set but not used variable 'id'
@ 2018-10-21  9:50 YueHaibing
  2018-10-22  8:58 ` John Garry
  2018-10-24  1:37 ` Martin K. Petersen
  0 siblings, 2 replies; 6+ messages in thread
From: YueHaibing @ 2018-10-21  9:50 UTC (permalink / raw)
  To: kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/mvsas/mv_sas.c: In function 'mvs_work_queue':
drivers/scsi/mvsas/mv_sas.c:1909:31: warning:
 variable 'id' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit
20b09c2992fe ("[SCSI] mvsas: add support for 94xx; layout change; bug fixes")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/mvsas/mv_sas.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 3df1428..ab50798 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -1906,8 +1906,6 @@ static void mvs_work_queue(struct work_struct *work)
 
 		if (phy->phy_event & PHY_PLUG_OUT) {
 			u32 tmp;
-			struct sas_identify_frame *id;
-			id = (struct sas_identify_frame *)phy->frame_rcvd;
 			tmp = MVS_CHIP_DISP->read_phy_ctl(mvi, phy_no);
 			phy->phy_event &= ~PHY_PLUG_OUT;
 			if (!(tmp & PHY_READY_MASK)) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH -next] mvsas: Remove set but not used variable 'id'
  2018-10-21  9:50 [PATCH -next] mvsas: Remove set but not used variable 'id' YueHaibing
@ 2018-10-22  8:58 ` John Garry
  2018-10-24  1:37 ` Martin K. Petersen
  1 sibling, 0 replies; 6+ messages in thread
From: John Garry @ 2018-10-22  8:58 UTC (permalink / raw)
  To: kernel-janitors

On 21/10/2018 10:50, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/mvsas/mv_sas.c: In function 'mvs_work_queue':
> drivers/scsi/mvsas/mv_sas.c:1909:31: warning:
>  variable 'id' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in commit
> 20b09c2992fe ("[SCSI] mvsas: add support for 94xx; layout change; bug fixes")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: John Garry <john.garry@huawei.com>

> ---
>  drivers/scsi/mvsas/mv_sas.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
> index 3df1428..ab50798 100644
> --- a/drivers/scsi/mvsas/mv_sas.c
> +++ b/drivers/scsi/mvsas/mv_sas.c
> @@ -1906,8 +1906,6 @@ static void mvs_work_queue(struct work_struct *work)
>
>  		if (phy->phy_event & PHY_PLUG_OUT) {
>  			u32 tmp;
> -			struct sas_identify_frame *id;
> -			id = (struct sas_identify_frame *)phy->frame_rcvd;

It would have been worth leaving a newline to avoid a possible 
checkpatch warning.

>  			tmp = MVS_CHIP_DISP->read_phy_ctl(mvi, phy_no);
>  			phy->phy_event &= ~PHY_PLUG_OUT;
>  			if (!(tmp & PHY_READY_MASK)) {
>
>
> .
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH -next] mvsas: Remove set but not used variable 'id'
  2018-10-21  9:50 [PATCH -next] mvsas: Remove set but not used variable 'id' YueHaibing
  2018-10-22  8:58 ` John Garry
@ 2018-10-24  1:37 ` Martin K. Petersen
  1 sibling, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2018-10-24  1:37 UTC (permalink / raw)
  To: kernel-janitors


YueHaibing,

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/mvsas/mv_sas.c: In function 'mvs_work_queue':
> drivers/scsi/mvsas/mv_sas.c:1909:31: warning:
>  variable 'id' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in commit
> 20b09c2992fe ("[SCSI] mvsas: add support for 94xx; layout change; bug fixes")

Applied to 4.20/scsi-queue. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH -next] mvsas: remove set but not used variables 'res_flag'
  2018-10-21  9:50 [PATCH -next] mvsas: Remove set but not used variable 'id' YueHaibing
  2018-10-22  8:58 ` John Garry
@ 2018-10-26  6:38 ` YueHaibing
  1 sibling, 0 replies; 6+ messages in thread
From: YueHaibing @ 2018-10-26  6:38 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, Kees Cook, John Garry,
	Jack Wang, Johannes Thumshirn
  Cc: YueHaibing, linux-scsi, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/mvsas/mv_init.c: In function 'mvs_ioremap':
drivers/scsi/mvsas/mv_init.c:315:36: warning:
 variable 'res_flag' set but not used [-Wunused-but-set-variable]
  unsigned long res_start, res_len, res_flag, res_flag_ex = 0;

It not used anymore after commit
92b19ff50e8f ("cleanup IORESOURCE_CACHEABLE vs ioremap()")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/mvsas/mv_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index 3ac3437..d7534fb 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -312,7 +312,7 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost)
 
 int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex)
 {
-	unsigned long res_start, res_len, res_flag, res_flag_ex = 0;
+	unsigned long res_start, res_len, res_flag_ex = 0;
 	struct pci_dev *pdev = mvi->pdev;
 	if (bar_ex != -1) {
 		/*
@@ -340,7 +340,6 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex)
 		goto err_out;
 	}
 
-	res_flag = pci_resource_flags(pdev, bar);
 	mvi->regs = ioremap(res_start, res_len);
 
 	if (!mvi->regs) {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH -next] mvsas: remove set but not used variables 'res_flag'
@ 2018-10-26  6:38 ` YueHaibing
  0 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2018-10-26  6:38 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, Kees Cook, John Garry,
	Jack Wang, Johannes Thumshirn
  Cc: YueHaibing, linux-scsi, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/mvsas/mv_init.c: In function 'mvs_ioremap':
drivers/scsi/mvsas/mv_init.c:315:36: warning:
 variable 'res_flag' set but not used [-Wunused-but-set-variable]
  unsigned long res_start, res_len, res_flag, res_flag_ex = 0;

It not used anymore after commit
92b19ff50e8f ("cleanup IORESOURCE_CACHEABLE vs ioremap()")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/mvsas/mv_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index 3ac3437..d7534fb 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -312,7 +312,7 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost)
 
 int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex)
 {
-	unsigned long res_start, res_len, res_flag, res_flag_ex = 0;
+	unsigned long res_start, res_len, res_flag_ex = 0;
 	struct pci_dev *pdev = mvi->pdev;
 	if (bar_ex != -1) {
 		/*
@@ -340,7 +340,6 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex)
 		goto err_out;
 	}
 
-	res_flag = pci_resource_flags(pdev, bar);
 	mvi->regs = ioremap(res_start, res_len);
 
 	if (!mvi->regs) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH -next] mvsas: remove set but not used variables 'res_flag'
@ 2018-10-26  6:38 ` YueHaibing
  0 siblings, 0 replies; 6+ messages in thread
From: YueHaibing @ 2018-10-26  6:38 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, Kees Cook, John Garry,
	Jack Wang, Johannes Thumshirn
  Cc: YueHaibing, linux-scsi, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/mvsas/mv_init.c: In function 'mvs_ioremap':
drivers/scsi/mvsas/mv_init.c:315:36: warning:
 variable 'res_flag' set but not used [-Wunused-but-set-variable]
  unsigned long res_start, res_len, res_flag, res_flag_ex = 0;

It not used anymore after commit
92b19ff50e8f ("cleanup IORESOURCE_CACHEABLE vs ioremap()")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/mvsas/mv_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index 3ac3437..d7534fb 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -312,7 +312,7 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost)
 
 int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex)
 {
-	unsigned long res_start, res_len, res_flag, res_flag_ex = 0;
+	unsigned long res_start, res_len, res_flag_ex = 0;
 	struct pci_dev *pdev = mvi->pdev;
 	if (bar_ex != -1) {
 		/*
@@ -340,7 +340,6 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex)
 		goto err_out;
 	}
 
-	res_flag = pci_resource_flags(pdev, bar);
 	mvi->regs = ioremap(res_start, res_len);
 
 	if (!mvi->regs) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-26  6:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26  6:38 [PATCH -next] mvsas: remove set but not used variables 'res_flag' YueHaibing
2018-10-26  6:38 ` YueHaibing
2018-10-26  6:38 ` YueHaibing
  -- strict thread matches above, loose matches on Subject: below --
2018-10-21  9:50 [PATCH -next] mvsas: Remove set but not used variable 'id' YueHaibing
2018-10-22  8:58 ` John Garry
2018-10-24  1:37 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.