Re: [PATCH net-next 2/9] r8152: Add support for RTL8157 SRAM access and ADV indirect access
From: Birger Koblitz
Date: Tue Mar 17 2026 - 01:10:53 EST
On 17/03/2026 1:52 am, Jakub Kicinski wrote:
On Sat, 14 Mar 2026 10:31:38 +0100 Birger Koblitz wrote:The same argument as for the unused r8157_desc_init() function in the previous part These functions support the new ADV and SRAM features of the RTL8157. If e.g. the rtl_bmu_clr_bits is moved to a last part of the series when the RTL8157 is actually used, this would also mean that the read/write functions it uses must be moved in a ripple effect as they in turn would become unused. It would make this part of the series only a patch introducing register addresses without any meaning. In my opinion, this makes it difficult to understand how the new features are used, and would make the last part of the series huge.
Add support for the SRAM access interface of the RTL8157 and
the ADV indirect access interface.
../drivers/net/usb/r8152.c:1757:12: warning: unused function 'rtl_bmu_clr_bits' [-Wunused-function]
1757 | static int rtl_bmu_clr_bits(struct r8152 *tp, u16 addr, u32 clear)
| ^~~~~~~~~~~~~~~~
../drivers/net/usb/r8152.c:1788:12: warning: unused function 'rtl_ip_clr_bits' [-Wunused-function]
1788 | static int rtl_ip_clr_bits(struct r8152 *tp, u16 addr, u32 clear)
| ^~~~~~~~~~~~~~~
../drivers/net/usb/r8152.c:1793:12: warning: unused function 'rtl_ip_set_bits' [-Wunused-function]
1793 | static int rtl_ip_set_bits(struct r8152 *tp, u16 addr, u32 set)
| ^~~~~~~~~~~~~~~
../drivers/net/usb/r8152.c:1810:13: warning: unused function 'sram_write_w0w1' [-Wunused-function]
1810 | static void sram_write_w0w1(struct r8152 *tp, u16 addr, u16 clear, u16 set)
| ^~~~~~~~~~~~~~~
../drivers/net/usb/r8152.c:1824:13: warning: unused function 'sram2_write_w0w1' [-Wunused-function]
1824 | static void sram2_write_w0w1(struct r8152 *tp, u16 addr, u16 clear, u16 set)
| ^~~~~~~~~~~~~~~~
../drivers/net/usb/r8152.c:9807:12: warning: unused function 'r8157_desc_init' [-Wunused-function]
9807 | static int r8157_desc_init(struct r8152 *tp)
| ^~~~~~~~~~~~~~~
Birger