linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 14/19] scsi: Change variable type to bool
       [not found] <1379802471-30252-1-git-send-email-peter.senna@gmail.com>
@ 2013-09-21 22:27 ` Peter Senna Tschudin
       [not found] ` <43e0f3a4fb62473e9bdd308a8dc4490f@fmsmsx104.amr.corp.intel.com>
  1 sibling, 0 replies; 2+ messages in thread
From: Peter Senna Tschudin @ 2013-09-21 22:27 UTC (permalink / raw)
  To: intel-linux-scu
  Cc: lukasz.dorau, maciej.patelczyk, dave.jiang, JBottomley,
	linux-scsi, linux-kernel, kernel-janitors, Peter Senna Tschudin

The variable success is only assigned the values true and false.
Change its type to bool.

The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):

@exists@
type T;
identifier b;
@@
- T
+ bool
  b = ...;
  ... when any
  b = \(true\|false\)

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
 drivers/scsi/isci/port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index 13098b0..26f8e5c 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -174,7 +174,7 @@ static void isci_port_link_up(struct isci_host *isci_host,
 {
 	unsigned long flags;
 	struct sci_port_properties properties;
-	unsigned long success = true;
+	bool success = true;
 
 	dev_dbg(&isci_host->pdev->dev,
 		"%s: isci_port = %p\n",
-- 
1.8.3.1

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

* RE: [PATCH 14/19] scsi: Change variable type to bool
       [not found] ` <43e0f3a4fb62473e9bdd308a8dc4490f@fmsmsx104.amr.corp.intel.com>
@ 2013-09-23 14:11   ` Dorau, Lukasz
  0 siblings, 0 replies; 2+ messages in thread
From: Dorau, Lukasz @ 2013-09-23 14:11 UTC (permalink / raw)
  To: Peter Senna Tschudin
  Cc: Patelczyk, Maciej, Jiang, Dave, JBottomley@parallels.com,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org, intel-linux-scu

On Sunday, September 22, 2013 12:28 AM Peter Senna Tschudin <peter.senna@gmail.com> wrote:
> 
> The variable success is only assigned the values true and false.
> Change its type to bool.
> 
> The simplified semantic patch that find this problem is as
> follows (http://coccinelle.lip6.fr/):
> 
> @exists@
> type T;
> identifier b;
> @@
> - T
> + bool
>   b = ...;
>   ... when any
>   b = \(true\|false\)
> 
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
> ---
>  drivers/scsi/isci/port.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
> index 13098b0..26f8e5c 100644
> --- a/drivers/scsi/isci/port.c
> +++ b/drivers/scsi/isci/port.c
> @@ -174,7 +174,7 @@ static void isci_port_link_up(struct isci_host *isci_host,
>  {
>  	unsigned long flags;
>  	struct sci_port_properties properties;
> -	unsigned long success = true;
> +	bool success = true;
> 
>  	dev_dbg(&isci_host->pdev->dev,
>  		"%s: isci_port = %p\n",
> --
> 1.8.3.1

Acked-by: Lukasz Dorau <lukasz.dorau@intel.com>

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

end of thread, other threads:[~2013-09-23 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1379802471-30252-1-git-send-email-peter.senna@gmail.com>
2013-09-21 22:27 ` [PATCH 14/19] scsi: Change variable type to bool Peter Senna Tschudin
     [not found] ` <43e0f3a4fb62473e9bdd308a8dc4490f@fmsmsx104.amr.corp.intel.com>
2013-09-23 14:11   ` Dorau, Lukasz

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).