diff mbox series

net: b44: Remove the unused function __b44_cam_read()

Message ID 20230128090413.79824-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State Accepted
Commit 1586f31e30ed041650e32147e79bb0837a42e11d
Delegated to: Netdev Maintainers
Headers show
Series net: b44: Remove the unused function __b44_cam_read() | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 1338 this patch: 1491
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang fail Errors and warnings before: 555 this patch: 443
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn fail Errors and warnings before: 768 this patch: 1134
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 28 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 1 now: 0

Commit Message

Jiapeng Chong Jan. 28, 2023, 9:04 a.m. UTC
The function __b44_cam_read() is defined in the b44.c file, but not called
elsewhere, so remove this unused function.

drivers/net/ethernet/broadcom/b44.c:199:20: warning: unused function '__b44_cam_read'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3858
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/net/ethernet/broadcom/b44.c | 22 ----------------------
 1 file changed, 22 deletions(-)

Comments

Simon Horman Jan. 28, 2023, 4:22 p.m. UTC | #1
On Sat, Jan 28, 2023 at 05:04:13PM +0800, Jiapeng Chong wrote:
> The function __b44_cam_read() is defined in the b44.c file, but not called
> elsewhere, so remove this unused function.
> 
> drivers/net/ethernet/broadcom/b44.c:199:20: warning: unused function '__b44_cam_read'.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3858
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Thanks,

This seems to have been the case since '__b44_cam_read' was
created via some refactoring in 2007 by

753f492093da ("[B44]: port to native ssb support")

But I'm not sure this warrants a fixes tag.

Reviewed-by: Simon Horman <simon.horman@corigine.com>
patchwork-bot+netdevbpf@kernel.org Jan. 31, 2023, 5:10 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 28 Jan 2023 17:04:13 +0800 you wrote:
> The function __b44_cam_read() is defined in the b44.c file, but not called
> elsewhere, so remove this unused function.
> 
> drivers/net/ethernet/broadcom/b44.c:199:20: warning: unused function '__b44_cam_read'.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3858
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> 
> [...]

Here is the summary with links:
  - net: b44: Remove the unused function __b44_cam_read()
    https://git.kernel.org/netdev/net-next/c/1586f31e30ed

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index b751dc8486dc..392ec09a1d8a 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -196,28 +196,6 @@  static int b44_wait_bit(struct b44 *bp, unsigned long reg,
 	return 0;
 }
 
-static inline void __b44_cam_read(struct b44 *bp, unsigned char *data, int index)
-{
-	u32 val;
-
-	bw32(bp, B44_CAM_CTRL, (CAM_CTRL_READ |
-			    (index << CAM_CTRL_INDEX_SHIFT)));
-
-	b44_wait_bit(bp, B44_CAM_CTRL, CAM_CTRL_BUSY, 100, 1);
-
-	val = br32(bp, B44_CAM_DATA_LO);
-
-	data[2] = (val >> 24) & 0xFF;
-	data[3] = (val >> 16) & 0xFF;
-	data[4] = (val >> 8) & 0xFF;
-	data[5] = (val >> 0) & 0xFF;
-
-	val = br32(bp, B44_CAM_DATA_HI);
-
-	data[0] = (val >> 8) & 0xFF;
-	data[1] = (val >> 0) & 0xFF;
-}
-
 static inline void __b44_cam_write(struct b44 *bp,
 				   const unsigned char *data, int index)
 {