[PATCH V4][next] Bluetooth: btintel_pcie: Remove structrually deadcode

Everest K.C. posted 1 patch 1 month, 1 week ago
drivers/bluetooth/btintel_pcie.c | 1 -
1 file changed, 1 deletion(-)
[PATCH V4][next] Bluetooth: btintel_pcie: Remove structrually deadcode
Posted by Everest K.C. 1 month, 1 week ago
The switch case statement has a default branch. Thus, the return
statement at the end of the function can never be reached.
Fix it by removing the return statement at the end of the
function.

This issue was reported by Coverity Scan.

Fixes: 5ea625845b0f ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
---
V3 -> V4: - Fixed typo in the subject
V2 -> V3: - Removed that the change was successfully built
	  - Removed the link to Coverity Scan report
V1 -> V2: - Changed "Fixing" to "Fix" in the changelog
          - Added that the change was successfully built
          - Added kernel-janitors mailing list to CC
 
 drivers/bluetooth/btintel_pcie.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index e4ae8c898dfd..660496e55276 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -391,7 +391,6 @@ static inline char *btintel_pcie_alivectxt_state2str(u32 alive_intr_ctxt)
 	default:
 		return "unknown";
 	}
-	return "null";
 }
 
 /* This function handles the MSI-X interrupt for gp0 cause (bit 0 in
-- 
2.43.0
Re: [PATCH V4][next] Bluetooth: btintel_pcie: Remove structrually deadcode
Posted by Dan Carpenter 1 month, 1 week ago
On Tue, Oct 15, 2024 at 05:22:05PM -0600, Everest K.C. wrote:
> The switch case statement has a default branch. Thus, the return
> statement at the end of the function can never be reached.
> Fix it by removing the return statement at the end of the
> function.
> 
> This issue was reported by Coverity Scan.
> 
> Fixes: 5ea625845b0f ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
> Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
> ---
> V3 -> V4: - Fixed typo in the subject

I don't like to be the typo police but, no, you didn't fix the typo.  :P

regards,
dan carpenter
Re: [PATCH V4][next] Bluetooth: btintel_pcie: Remove structrually deadcode
Posted by Everest K.C. 1 month, 1 week ago
On Wed, Oct 16, 2024 at 8:42 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> On Tue, Oct 15, 2024 at 05:22:05PM -0600, Everest K.C. wrote:
> > The switch case statement has a default branch. Thus, the return
> > statement at the end of the function can never be reached.
> > Fix it by removing the return statement at the end of the
> > function.
> >
> > This issue was reported by Coverity Scan.
> >
> > Fixes: 5ea625845b0f ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
> > Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
> > Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
> > ---
> > V3 -> V4: - Fixed typo in the subject
>
> I don't like to be the typo police but, no, you didn't fix the typo.  :P
No, using the correct spelling helps in searching the patches in lore.
Thank you, will send a V5.
> regards,
> dan carpenter
>
Thanks,
Everest K.C.