From nobody Sun Jun 14 17:33:36 2026 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C18051531C1 for ; Sat, 4 Apr 2026 12:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775306997; cv=none; b=K3PCSST2kVob9/6U81ABRE/SNkhNWsbiBV0ULWrkpeFFUKVfJfMOhJZ/MpT7MftKRLCt5segFxjH4pdpChDatEsRuognIRC3/lWZ/dd9nS9aCddJcf51pImP8UvYqQ+y1eTZ1HIkeOFra7PcXBDx5q6zMdAEh1aKdPK+GMSawlA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775306997; c=relaxed/simple; bh=AxHV97E1JPr4eIYd4zhbPaThMgO5N4TroR37fM8RFro=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=X9XDZH8zK3yUuTy48OCVMvKbDkisNPuaxULDmpXVO6x5asxa5s6nm+WYOoe4t/hMB9NbsUZjF3oBQxbwqKI9/xtvuYpT1jDt+uqFfbnW7UuVxTOC6HQRDRPxMMYChPA98o7MPcJFO4TrWntJtwUIWYXM9P/NQBZs7QOs6ma2kVU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=i9Aqc0eY; arc=none smtp.client-ip=209.85.128.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i9Aqc0eY" Received: by mail-wm1-f65.google.com with SMTP id 5b1f17b1804b1-488a88aeec9so2128185e9.2 for ; Sat, 04 Apr 2026 05:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775306994; x=1775911794; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=O4LY4CvGy+VWA2mY61PIObjTLY+/ovvfVe25JPqLY6c=; b=i9Aqc0eYQCtszzhn1vDsY8XmZ/eAxZwCngEFprm6zlqEPrrlhGQZC+YV9C6n7+OOdO eRapCsaVEvfmDckNE6AVzrwPFksmWtddF3bBaMNtssDfZJb2cEpSVG9kxHk5lFImr14M bJcTW+1tJoLZ5s7H/00gZFHJyjHSasY7+QaJqsCxc+7tU7RgIau1cf39c6vXVFVN9j2F Z/F4Ji6YZUOVjQNFZb0t1b5MQtS8DK8WDKnVJaOjwjTyx3YnPjf2dWO85FAscHPpAliJ eKDJMbchCNwe59jEEZBIg5C3wSQamcGMAfQxrdAk0Kgax+O1e42ptorY1vaF1gaEKdWj jrsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775306994; x=1775911794; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=O4LY4CvGy+VWA2mY61PIObjTLY+/ovvfVe25JPqLY6c=; b=b1360US8pFsEcg/E9wlsLHCGQbJvc7ciOVefwavq/BoXin7ltB9jElkZHasajukX6R HF5L2Zr8LZvhM3Oc8EaN+S5WiLd/AKwRl6MQx+XZEDSSRRgBczq0OARp4ZOqnc9FNy5t 0Mew8VORuhGfS93xxKC6NuxZBEGu5omIiMeYJo2tYZoWwdQzW4XeJu0A5hEENJQiFXQJ APrk03nJrUnsyLaliFXBpWGyaOMJehzyUj8KHMWCF+nqruKHDITKAwQukOLKUoMCvUM0 nuBygVgDX3/xhlculi2/FqrTq8rX3G9aj3Kt0K5cQDDYF4ijuJD1rTbBpg5C5nEgoff3 W1WA== X-Forwarded-Encrypted: i=1; AJvYcCXjGWMl7CUDd8Z0OYenj8334HXmYdk0AjIo09dFXRcfOVvDPWuMbQCjmkrkc5JZl1okkc0KDcTuZbvSi8Y=@vger.kernel.org X-Gm-Message-State: AOJu0YwODLNNh0jQF5E0iz3syChO861UH6yJsa172IEEkXYjn/h3kWE5 UMIdqJtvuHtZory55OaN167HOBCZyj6AESmYeIF1Glojr6AVfJoSdoOd X-Gm-Gg: AeBDiesY7X7NlIebPhvNt5my967/5fPLqskUHEA3hWTngMWdhBRHFcj4SueFFtlEzoo DYAgFadGgkIsIYSMKFS4Sf2lYoLi8MqfoiUbHMq39/IbuqWFwe8z9FA+MNLhmulmrv5gEYbpUpd Q9WS5bY8SHXdW7AlrI+B6KIUpRPQkxO8vJ+dZKBcyMOjGOWVXh108HeF2vy7HfTWtcuYqzav4DD oUCnnVnPIvn8laGP4jBz2qwfegdiFy9PXDR4qTaC++jAciiw4Fio6kSCuqqtMvCXxLi9e5pyQhw JuSNagJIN39gRylLwwwwETph6PhiRy+aI0wL2m7Cm3yMiWZf7H8vm0DWnOKgWn1/TcfFtsV1gp4 /4pGgb7zUwMxk3+IFTE2t0+0coP03YiQlTzjYS32A9SQR/NM3PtwTni1T91ATIuFNZi+HpKulHR HdARW4bht5/Eb4kQe8USb1 X-Received: by 2002:a05:600c:310c:b0:488:a894:b27a with SMTP id 5b1f17b1804b1-488a894b3f4mr10534625e9.8.1775306993778; Sat, 04 Apr 2026 05:49:53 -0700 (PDT) Received: from bera-arch ([2a02:ff0:c13:2eeb:2e7c:3a4f:2bc2:f78a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e4f1a99sm26920119f8f.32.2026.04.04.05.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2026 05:49:53 -0700 (PDT) From: =?UTF-8?q?Bera=20Y=C3=BCzl=C3=BC?= To: gregkh@linuxfoundation.org Cc: ethantidmore06@gmail.com, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, =?UTF-8?q?Bera=20Y=C3=BCzl=C3=BC?= Subject: [PATCH] staging: rtl8723bs: remove unused function pointers Date: Sat, 4 Apr 2026 15:49:48 +0300 Message-ID: <20260404124947.52549-2-b9788213@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Remove unused struct members from _io_ops. With removal of this members some functions in sdio_ops.c became useless so they are also removed. Signed-off-by: Bera Y=C3=BCzl=C3=BC Reviewed-by: Luka Gejak --- drivers/staging/rtl8723bs/hal/sdio_ops.c | 116 --------------------- drivers/staging/rtl8723bs/include/rtw_io.h | 16 --- 2 files changed, 132 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl= 8723bs/hal/sdio_ops.c index 8cece69dbf79..653395ff4b1c 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -191,51 +191,6 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 a= ddr) return val; } =20 -static s32 sdio_readN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf) -{ - struct adapter *adapter; - u8 mac_pwr_ctrl_on; - u8 device_id; - u16 offset; - u32 ftaddr; - u8 shift; - s32 err; - - adapter =3D intfhdl->padapter; - err =3D 0; - - ftaddr =3D _cvrt2ftaddr(addr, &device_id, &offset); - - rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on); - if ( - ((device_id =3D=3D WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) || - (!mac_pwr_ctrl_on) || - (adapter_to_pwrctl(adapter)->fw_current_in_ps_mode) - ) - return sd_cmd52_read(intfhdl, ftaddr, cnt, buf); - - /* 4 bytes alignment */ - shift =3D ftaddr & 0x3; - if (shift =3D=3D 0) { - err =3D sd_read(intfhdl, ftaddr, cnt, buf); - } else { - u8 *tmpbuf; - u32 n; - - ftaddr &=3D ~(u16)0x3; - n =3D cnt + shift; - tmpbuf =3D kmalloc(n, GFP_ATOMIC); - if (!tmpbuf) - return -ENOMEM; - - err =3D sd_read(intfhdl, ftaddr, n, tmpbuf); - if (!err) - memcpy(buf, tmpbuf + shift, cnt); - kfree(tmpbuf); - } - return err; -} - static s32 sdio_write8(struct intf_hdl *intfhdl, u32 addr, u8 val) { u32 ftaddr; @@ -295,73 +250,6 @@ static s32 sdio_write32(struct intf_hdl *intfhdl, u32 = addr, u32 val) return err; } =20 -static s32 sdio_writeN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *bu= f) -{ - struct adapter *adapter; - u8 mac_pwr_ctrl_on; - u8 device_id; - u16 offset; - u32 ftaddr; - u8 shift; - s32 err; - - adapter =3D intfhdl->padapter; - err =3D 0; - - ftaddr =3D _cvrt2ftaddr(addr, &device_id, &offset); - - rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on); - if ( - ((device_id =3D=3D WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) || - (!mac_pwr_ctrl_on) || - (adapter_to_pwrctl(adapter)->fw_current_in_ps_mode) - ) - return sd_cmd52_write(intfhdl, ftaddr, cnt, buf); - - shift =3D ftaddr & 0x3; - if (shift =3D=3D 0) { - err =3D sd_write(intfhdl, ftaddr, cnt, buf); - } else { - u8 *tmpbuf; - u32 n; - - ftaddr &=3D ~(u16)0x3; - n =3D cnt + shift; - tmpbuf =3D kmalloc(n, GFP_ATOMIC); - if (!tmpbuf) - return -ENOMEM; - err =3D sd_read(intfhdl, ftaddr, 4, tmpbuf); - if (err) { - kfree(tmpbuf); - return err; - } - memcpy(tmpbuf + shift, buf, cnt); - err =3D sd_write(intfhdl, ftaddr, n, tmpbuf); - kfree(tmpbuf); - } - return err; -} - -static void sdio_read_mem( - struct intf_hdl *intfhdl, - u32 addr, - u32 cnt, - u8 *rmem -) -{ - sdio_readN(intfhdl, addr, cnt, rmem); -} - -static void sdio_write_mem( - struct intf_hdl *intfhdl, - u32 addr, - u32 cnt, - u8 *wmem -) -{ - sdio_writeN(intfhdl, addr, cnt, wmem); -} - /* * Description: *Read from RX FIFO @@ -463,14 +351,10 @@ void sdio_set_intf_ops(struct adapter *adapter, struc= t _io_ops *ops) ops->_read8 =3D &sdio_read8; ops->_read16 =3D &sdio_read16; ops->_read32 =3D &sdio_read32; - ops->_read_mem =3D &sdio_read_mem; - ops->_read_port =3D &sdio_read_port; =20 ops->_write8 =3D &sdio_write8; ops->_write16 =3D &sdio_write16; ops->_write32 =3D &sdio_write32; - ops->_writeN =3D &sdio_writeN; - ops->_write_mem =3D &sdio_write_mem; ops->_write_port =3D &sdio_write_port; } =20 diff --git a/drivers/staging/rtl8723bs/include/rtw_io.h b/drivers/staging/r= tl8723bs/include/rtw_io.h index adf1de4d7924..3c99a2bc19bd 100644 --- a/drivers/staging/rtl8723bs/include/rtw_io.h +++ b/drivers/staging/rtl8723bs/include/rtw_io.h @@ -18,24 +18,8 @@ struct _io_ops { int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val); int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val); int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val); - int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdat= a); =20 - int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val); - int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val); - int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val); - - void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem= ); - void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pme= m); - - u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr); - - u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem= ); u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pme= m); - - u32 (*_write_scsi)(struct intf_hdl *pintfhdl, u32 cnt, u8 *pmem); - - void (*_read_port_cancel)(struct intf_hdl *pintfhdl); - void (*_write_port_cancel)(struct intf_hdl *pintfhdl); }; =20 struct intf_hdl { --=20 2.53.0