linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: mpt3sas: use true,false for bool variables
@ 2020-04-21  3:41 Jason Yan
  2020-04-21  6:14 ` Suganath Prabu Subramani
  2020-04-22  4:08 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Jason Yan @ 2020-04-21  3:41 UTC (permalink / raw)
  To: sathya.prakash, chaitra.basappa, suganath-prabu.subramani, jejb,
	martin.petersen, sreekanth.reddy, MPT-FusionLinux.pdl,
	linux-scsi, linux-kernel
  Cc: Jason Yan

Fix the following coccicheck warning:

drivers/scsi/mpt3sas/mpt3sas_base.c:416:6-14: WARNING: Assignment of 0/1
to bool variable
drivers/scsi/mpt3sas/mpt3sas_base.c:485:2-10: WARNING: Assignment of 0/1
to bool variable

Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 06285b03fa00..4544ba4bf47d 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -413,7 +413,7 @@ static void _clone_sg_entries(struct MPT3SAS_ADAPTER *ioc,
 {
 	Mpi2SGESimple32_t *sgel, *sgel_next;
 	u32  sgl_flags, sge_chain_count = 0;
-	bool is_write = 0;
+	bool is_write = false;
 	u16 i = 0;
 	void __iomem *buffer_iomem;
 	phys_addr_t buffer_iomem_phys;
@@ -482,7 +482,7 @@ static void _clone_sg_entries(struct MPT3SAS_ADAPTER *ioc,
 
 	if (le32_to_cpu(sgel->FlagsLength) &
 			(MPI2_SGE_FLAGS_HOST_TO_IOC << MPI2_SGE_FLAGS_SHIFT))
-		is_write = 1;
+		is_write = true;
 
 	for (i = 0; i < MPT_MIN_PHYS_SEGMENTS + ioc->facts.MaxChainDepth; i++) {
 
-- 
2.21.1


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

* Re: [PATCH] scsi: mpt3sas: use true,false for bool variables
  2020-04-21  3:41 [PATCH] scsi: mpt3sas: use true,false for bool variables Jason Yan
@ 2020-04-21  6:14 ` Suganath Prabu Subramani
  2020-04-22  4:08 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Suganath Prabu Subramani @ 2020-04-21  6:14 UTC (permalink / raw)
  To: Jason Yan
  Cc: Sathya Prakash Veerichetty, Chaitra Basappa,
	James E.J. Bottomley, Martin K. Petersen, Sreekanth Reddy,
	PDL-MPT-FUSIONLINUX, linux-scsi, Linux Kernel Mailing List

Acked-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>

Thanks.



On Tue, Apr 21, 2020 at 9:12 AM Jason Yan <yanaijie@huawei.com> wrote:
>
> Fix the following coccicheck warning:
>
> drivers/scsi/mpt3sas/mpt3sas_base.c:416:6-14: WARNING: Assignment of 0/1
> to bool variable
> drivers/scsi/mpt3sas/mpt3sas_base.c:485:2-10: WARNING: Assignment of 0/1
> to bool variable
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 06285b03fa00..4544ba4bf47d 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -413,7 +413,7 @@ static void _clone_sg_entries(struct MPT3SAS_ADAPTER *ioc,
>  {
>         Mpi2SGESimple32_t *sgel, *sgel_next;
>         u32  sgl_flags, sge_chain_count = 0;
> -       bool is_write = 0;
> +       bool is_write = false;
>         u16 i = 0;
>         void __iomem *buffer_iomem;
>         phys_addr_t buffer_iomem_phys;
> @@ -482,7 +482,7 @@ static void _clone_sg_entries(struct MPT3SAS_ADAPTER *ioc,
>
>         if (le32_to_cpu(sgel->FlagsLength) &
>                         (MPI2_SGE_FLAGS_HOST_TO_IOC << MPI2_SGE_FLAGS_SHIFT))
> -               is_write = 1;
> +               is_write = true;
>
>         for (i = 0; i < MPT_MIN_PHYS_SEGMENTS + ioc->facts.MaxChainDepth; i++) {
>
> --
> 2.21.1
>

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

* Re: [PATCH] scsi: mpt3sas: use true,false for bool variables
  2020-04-21  3:41 [PATCH] scsi: mpt3sas: use true,false for bool variables Jason Yan
  2020-04-21  6:14 ` Suganath Prabu Subramani
@ 2020-04-22  4:08 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-04-22  4:08 UTC (permalink / raw)
  To: Jason Yan
  Cc: sathya.prakash, chaitra.basappa, suganath-prabu.subramani, jejb,
	martin.petersen, sreekanth.reddy, MPT-FusionLinux.pdl,
	linux-scsi, linux-kernel


Jason,

> Fix the following coccicheck warning:
>
> drivers/scsi/mpt3sas/mpt3sas_base.c:416:6-14: WARNING: Assignment of 0/1
> to bool variable
> drivers/scsi/mpt3sas/mpt3sas_base.c:485:2-10: WARNING: Assignment of 0/1
> to bool variable

Applied to 5.8/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-04-22  4:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21  3:41 [PATCH] scsi: mpt3sas: use true,false for bool variables Jason Yan
2020-04-21  6:14 ` Suganath Prabu Subramani
2020-04-22  4:08 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).