public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ibft: add a missing break statement
@ 2013-01-11  6:48 Dan Carpenter
  2013-01-11 14:52 ` Peter Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-01-11  6:48 UTC (permalink / raw)
  To: Peter Jones; +Cc: Konrad Rzeszutek Wilk, linux-kernel, kernel-janitors

The code works the same with or without the break.  It just looks a bit
cleaner to not fall through.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index 3ee852c..c4b187c 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
@@ -503,6 +503,7 @@ static umode_t __init ibft_check_tgt_for(void *data, int type)
 	case ISCSI_BOOT_TGT_NIC_ASSOC:
 	case ISCSI_BOOT_TGT_CHAP_TYPE:
 		rc = S_IRUGO;
+		break;
 	case ISCSI_BOOT_TGT_NAME:
 		if (tgt->tgt_name_len)
 			rc = S_IRUGO;

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

* Re: [patch] ibft: add a missing break statement
  2013-01-11  6:48 [patch] ibft: add a missing break statement Dan Carpenter
@ 2013-01-11 14:52 ` Peter Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Jones @ 2013-01-11 14:52 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Konrad Rzeszutek Wilk, linux-kernel, kernel-janitors

On Fri, Jan 11, 2013 at 09:48:07AM +0300, Dan Carpenter wrote:
> The code works the same with or without the break.  It just looks a bit
> cleaner to not fall through.

Yeah, you're clearly right.

For those reading this, so you don't have to go check yourselves, the
line after the end of this diff is also a break; there's no further code
in that case.

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Peter Jones <pjones@redhat.com>

> 
> diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
> index 3ee852c..c4b187c 100644
> --- a/drivers/firmware/iscsi_ibft.c
> +++ b/drivers/firmware/iscsi_ibft.c
> @@ -503,6 +503,7 @@ static umode_t __init ibft_check_tgt_for(void *data, int type)
>  	case ISCSI_BOOT_TGT_NIC_ASSOC:
>  	case ISCSI_BOOT_TGT_CHAP_TYPE:
>  		rc = S_IRUGO;
> +		break;
>  	case ISCSI_BOOT_TGT_NAME:
>  		if (tgt->tgt_name_len)
>  			rc = S_IRUGO;

-- 
        Peter

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11  6:48 [patch] ibft: add a missing break statement Dan Carpenter
2013-01-11 14:52 ` Peter Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox