public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: "Randy Dunlap" <rdunlap@infradead.org>,
	"kernel test robot" <lkp@intel.com>, "Michael Büsch" <m@bues.ch>,
	linux-wireless@vger.kernel.org, "Kalle Valo" <kvalo@kernel.org>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	llvm@lists.linux.dev
Subject: [PATCH] ssb: use "break" on default case to prevent warning
Date: Tue, 12 Mar 2024 17:13:03 -0700	[thread overview]
Message-ID: <20240313001305.18820-1-rdunlap@infradead.org> (raw)

Having an empty default: case in a switch statement causes a warning
(when using Clang; I don't see the warning when using gcc),
so add a "break;" to the default case to prevent the warning:

drivers/ssb/main.c:1149:2: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]

Fixes: e27b02e23a70 ("ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403130717.TWm17FiD-lkp@intel.com/
Cc: Michael Büsch <m@bues.ch>
Cc: linux-wireless@vger.kernel.org
Cc: Kalle Valo <kvalo@kernel.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: llvm@lists.linux.dev
---
 drivers/ssb/main.c |    1 +
 1 file changed, 1 insertion(+)

diff -- a/drivers/ssb/main.c b/drivers/ssb/main.c
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -1144,6 +1144,7 @@ u32 ssb_dma_translation(struct ssb_devic
 				return SSB_PCI_DMA;
 		}
 	default:
+		break;
 	}
 	return 0;
 }

             reply	other threads:[~2024-03-13  0:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  0:13 Randy Dunlap [this message]
2024-03-13  6:57 ` [PATCH] ssb: use "break" on default case to prevent warning Michael Büsch
2024-03-13 15:32 ` Nathan Chancellor
2024-03-14  8:56 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240313001305.18820-1-rdunlap@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=m@bues.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox