diff mbox series

[V2,next] Bluetooth: btintel_pcie: Remove structually deadcode

Message ID 20241015045843.20134-1-everestkc@everestkc.com.np (mailing list archive)
State Superseded
Headers show
Series [V2,next] Bluetooth: btintel_pcie: Remove structually deadcode | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch warning WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #105: https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600709 total: 0 errors, 1 warnings, 7 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13835733.patch has style problems, please review. NOTE: Ignored message types: UNKNOWN_COMMIT_ID NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
tedd_an/GitLint fail WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 18: B2 Line has trailing whitespace: " "
tedd_an/SubjectPrefix success Gitlint PASS
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse success CheckSparse PASS

Commit Message

Everest K.C. Oct. 15, 2024, 4:58 a.m. UTC
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.
The intel bluetooth module was successfully built after the change
without any errors.

This issue was reported by Coverity Scan.
https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600709

Fixes: 5ea625845b0f ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
---
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(-)

Comments

Dan Carpenter Oct. 15, 2024, 9:48 a.m. UTC | #1
The subject has a typo.  s/structually/structurally/

> The intel bluetooth module was successfully built after the change
> without any errors.
> 

Delete this sentence.  It should just be assumed that changes don't break the
build.  You can put that code isn't tested under the --- cut off line, if you
want to put a warning message.  But we don't need this in the permanent git log.


> This issue was reported by Coverity Scan.
> https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600709
> 
> Fixes: 5ea625845b0f ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
> Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
> ---
  ^^^
Cut off line.

regards,
dan carpenter
Shuah Khan Oct. 15, 2024, 4:01 p.m. UTC | #2
On 10/15/24 03:48, Dan Carpenter wrote:
> The subject has a typo.  s/structually/structurally/
> 
>> The intel bluetooth module was successfully built after the change
>> without any errors.
>>
> 
> Delete this sentence.  It should just be assumed that changes don't break the
> build.  You can put that code isn't tested under the --- cut off line, if you
> want to put a warning message.  But we don't need this in the permanent git log.
> 
> 
>> This issue was reported by Coverity Scan.
>> https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600709

Restating what I said in your other coverity patch, include
the coverity warning. This link requires login and no use
for people who don't have coverity account.

In the future don't include link that require login in the
commit logs.

>>
>> Fixes: 5ea625845b0f ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
>> Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
>> ---
>    ^^^
> Cut off line.
> 
> regards,
> dan carpenter
> 

thanks,
-- Shuah
Everest K.C. Oct. 15, 2024, 4:08 p.m. UTC | #3
On Tue, Oct 15, 2024 at 10:01 AM Shuah Khan <skhan@linuxfoundation.org> wrote:
Hi Shuah,
> On 10/15/24 03:48, Dan Carpenter wrote:
> > The subject has a typo.  s/structually/structurally/
> >
> >> The intel bluetooth module was successfully built after the change
> >> without any errors.
> >>
> >
> > Delete this sentence.  It should just be assumed that changes don't break the
> > build.  You can put that code isn't tested under the --- cut off line, if you
> > want to put a warning message.  But we don't need this in the permanent git log.

Should I remove the line that says the module was successfully built
after the change,
as Dan suggested ?

> >
> >> This issue was reported by Coverity Scan.
> >> https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600709
>
> Restating what I said in your other coverity patch, include
> the coverity warning. This link requires login and no use
> for people who don't have coverity account.

The coverity scan dashboard no longer has the issue. So,I don't have
access to the coverity
warning.

> In the future don't include link that require login in the
> commit logs.
Got it.
> >>
> >> Fixes: 5ea625845b0f ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
> >> Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
> >> ---
> >    ^^^
> > Cut off line.
> >
> > regards,
> > dan carpenter
> >
>
> thanks,
> -- Shuah
Shuah Khan Oct. 15, 2024, 4:10 p.m. UTC | #4
On 10/15/24 10:08, Everest K.C. wrote:
> On Tue, Oct 15, 2024 at 10:01 AM Shuah Khan <skhan@linuxfoundation.org> wrote:
> Hi Shuah,
>> On 10/15/24 03:48, Dan Carpenter wrote:
>>> The subject has a typo.  s/structually/structurally/
>>>
>>>> The intel bluetooth module was successfully built after the change
>>>> without any errors.
>>>>
>>>
>>> Delete this sentence.  It should just be assumed that changes don't break the
>>> build.  You can put that code isn't tested under the --- cut off line, if you
>>> want to put a warning message.  But we don't need this in the permanent git log.
> 
> Should I remove the line that says the module was successfully built
> after the change,
> as Dan suggested ?

Yes - please.

> 
>>>
>>>> This issue was reported by Coverity Scan.
>>>> https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600709
>>
>> Restating what I said in your other coverity patch, include
>> the coverity warning. This link requires login and no use
>> for people who don't have coverity account.
> 
> The coverity scan dashboard no longer has the issue. So,I don't have
> access to the coverity
> warning.

Remove this from the log in that case.

> 
>> In the future don't include link that require login in the
>> commit logs.
> Got it.
>>>>
>>>> Fixes: 5ea625845b0f ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
>>>> Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
>>>> ---
>>>     ^^^
>>> Cut off line.
>>>
>>> regards,
>>> dan carpenter
>>>
>>

thanks,
-- Shuah
diff mbox series

Patch

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