From nobody Sun May 24 19:35:39 2026 Received: from forward206d.mail.yandex.net (forward206d.mail.yandex.net [178.154.239.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79A1A50276; Sat, 23 May 2026 05:20:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.215 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513661; cv=none; b=mmIu88tNEqKcEak9uN9FmNQR2tIVTAEGFNo1asdWuiHLbMkJ6Crb3nHYpvcrPOihsw1imHkCQAIQsKHrlOAtNnAZ5gE1fH5oD8prosRkH0JEvCNvRmGvK5kGBPWZ2PowHlVBYq0FkWxkdYRTjkxqndKDElz+12quWdJKUxN/tGE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513661; c=relaxed/simple; bh=jhAZhwYyH3z/UIhyB6X6iqPxCoGsOadQwL2r0JLKflQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lAdmnffR3tedJo2SK78ymjxNt5W6inc0RYkuxZcyzekBqCDJic9itcvuoOnDSjcUHjcbU+lrmjI5BrkPOjLjre1AlDYMtH+l/9rwtZGsPLdux33reC4mLSDfePcowRzGibniFmme+pAw9/XEZudoko8+V5sf3UagNlMjeG9JWnM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net; spf=pass smtp.mailfrom=sezginduran.net; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b=cLmbDDjY; arc=none smtp.client-ip=178.154.239.215 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b="cLmbDDjY" Received: from forward101d.mail.yandex.net (forward101d.mail.yandex.net [IPv6:2a02:6b8:c41:1300:1:45:d181:d101]) by forward206d.mail.yandex.net (Yandex) with ESMTPS id E607881017; Sat, 23 May 2026 08:15:26 +0300 (MSK) Received: from mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:27a5:0:640:93ca:0]) by forward101d.mail.yandex.net (Yandex) with ESMTPS id 08CA3C0040; Sat, 23 May 2026 08:15:19 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (smtp) with ESMTPSA id DFNL0fJe2Ko0-PKEWkJ2t; Sat, 23 May 2026 08:15:18 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sezginduran.net; s=mail; t=1779513318; bh=fXeUhCQGKvbFptJcpXo4xTKVP8cMRRXUXFFOsgvWJ34=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=cLmbDDjYqM0/s3FszkQA4FXuZZCutTFV9FhaWenSkoa+ZUNgkqjXYyPjh3/u7TjW5 8RKhbnrkBchgpUHq2WpBWYreGQPLbpNQWy962O+0h206H/Xf+RRsD63KEB4dg4718N bTbyr9+6+IdwsWEmIjoPWFZRQSPwAT+JtJa1wVZQ= Authentication-Results: mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net; dkim=pass header.i=@sezginduran.net From: Ahmet Sezgin Duran To: gregkh@linuxfoundation.org Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ahmet Sezgin Duran Subject: [PATCH 1/5] staging: sm750fb: remove commented-out forward declarations Date: Sat, 23 May 2026 05:15:05 +0000 Message-ID: <20260523051509.166152-2-ahmet@sezginduran.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260523051509.166152-1-ahmet@sezginduran.net> References: <20260523051509.166152-1-ahmet@sezginduran.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The block at the top of sm750.c declares lynxfb_ops_write() and lynxfb_ops_read() inside a commented-out #ifdef __BIG_ENDIAN guard. Neither function is defined anywhere in the driver, so the block is dead. Remove it. Signed-off-by: Ahmet Sezgin Duran --- drivers/staging/sm750fb/sm750.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm75= 0.c index 89c811e0806c..02db1418476b 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -8,15 +8,6 @@ #include "sm750_accel.h" #include "sm750_cursor.h" =20 -/* - * #ifdef __BIG_ENDIAN - * ssize_t lynxfb_ops_write(struct fb_info *info, const char __user *buf, - * size_t count, loff_t *ppos); - * ssize_t lynxfb_ops_read(struct fb_info *info, char __user *buf, - * size_t count, loff_t *ppos); - * #endif - */ - /* common var for all device */ static int g_hwcursor =3D 1; static int g_noaccel __ro_after_init; --=20 2.53.0 From nobody Sun May 24 19:35:39 2026 Received: from forward102d.mail.yandex.net (forward102d.mail.yandex.net [178.154.239.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35B152C0F91; Sat, 23 May 2026 05:15:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.213 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513331; cv=none; b=i9JtuHRpt/N0kEuIEXjEN9sQPPO7X+LtCPzg5hVFvP9i0J5kr4mR5xHXfBs8kaoFmNvxE/XbG0QVwr1kkIg3xVk5cPhRowWO9D08tsYovySDpZS96Mea7t88r4I4DyHEc1Y8l5FudTbFhCfxn/2pTqlrLgx4LqkvBZise/yn0mE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513331; c=relaxed/simple; bh=0kZco4Rx+droJCiIqGv2f4c5UGEs1FVpatTaO6z03+M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f3s/dHvD4QgAuU6eOMDdsggXBSdjaN86wof0KoQL91s0YIKi5rT9EP84TIq4BLC1DPxPPHpHbS6vshTW6Hrj9S9vQPpQKIXE65x6amq2ptr6s7GLft0X1iFWHdxzHRoLKfuZaEApIhKByFGP1pSg2tQNWDNy+uduWLixbMTl0xw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net; spf=pass smtp.mailfrom=sezginduran.net; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b=hi0BRUOv; arc=none smtp.client-ip=178.154.239.213 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b="hi0BRUOv" Received: from mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:27a5:0:640:93ca:0]) by forward102d.mail.yandex.net (Yandex) with ESMTPS id 5C49EC0009; Sat, 23 May 2026 08:15:20 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (smtp) with ESMTPSA id DFNL0fJe2Ko0-5Ft7xLIW; Sat, 23 May 2026 08:15:19 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sezginduran.net; s=mail; t=1779513319; bh=HFjaDY2NIDRS7NxfGe2m2Ws1Ih4v5qRQzHSLIRao1FA=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=hi0BRUOvqLCxcxXe6B56czpxwtfaCw5BdJrBKWk87uKd9zQOTtEwrNpDd/uB2TSCC d6659Viz8Q8WhRIoyue0wp59VZrFmzOGnrMalQQu92jCrE1e/Ha5dqI7I0/F3wtpyv 5M6S5qbOPHWYS/q4QtUdGgEGzUW1B4Y12Us2Wjx8= Authentication-Results: mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net; dkim=pass header.i=@sezginduran.net From: Ahmet Sezgin Duran To: gregkh@linuxfoundation.org Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ahmet Sezgin Duran Subject: [PATCH 2/5] staging: sm750fb: remove unnecessary initializations Date: Sat, 23 May 2026 05:15:06 +0000 Message-ID: <20260523051509.166152-3-ahmet@sezginduran.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260523051509.166152-1-ahmet@sezginduran.net> References: <20260523051509.166152-1-ahmet@sezginduran.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove two instances of `ret =3D 0` initializations since the variable is overridden unconditionally before being used. Signed-off-by: Ahmet Sezgin Duran --- drivers/staging/sm750fb/sm750.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm75= 0.c index 02db1418476b..fff9c35ee7b0 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -343,7 +343,6 @@ static int lynxfb_ops_set_par(struct fb_info *info) if (!info) return -EINVAL; =20 - ret =3D 0; par =3D info->par; crtc =3D &par->crtc; output =3D &par->output; @@ -463,7 +462,6 @@ static int lynxfb_ops_check_var(struct fb_var_screeninf= o *var, if (!var->pixclock) return -EINVAL; =20 - ret =3D 0; par =3D info->par; crtc =3D &par->crtc; =20 --=20 2.53.0 From nobody Sun May 24 19:35:39 2026 Received: from forward100d.mail.yandex.net (forward100d.mail.yandex.net [178.154.239.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41B7850276; Sat, 23 May 2026 05:15:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.211 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513330; cv=none; b=pG6mepI294pz1WhFvTxsejMy3LsQRc3hYndoNqdARv5cx7ndb/mdCG0aaVZNLtSra4zlDDW/sw8hWPSAwc2v/0sJm3zR4drHa0FehLBC4DXKiyIAddh3pceki99jVMbPFrVowQoMB33+TXP//Yt6gZmyDyQ9JqU6DQ2kWSvlWo4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513330; c=relaxed/simple; bh=rXJJ8vJ/Q3LUiSk2agOZ9I7LplORzBOq69KAPAn2nwI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YfJxJPBBK4sICMR8cCfnMWiNFZO8nJbqSvZpKLD+tAlKfZaTecw0KosSeVJ2wsJPhFJV0YBE7I49DcF3ZrtK0emfuO2kY0+NvX99QNyBQnvA9HGmOg0h2T0Un4HJH4eT+Wmpicipdk+lr+kNbk0EI0VHp929S2pnyF+zHYDGQLQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net; spf=pass smtp.mailfrom=sezginduran.net; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b=bwj0ySeu; arc=none smtp.client-ip=178.154.239.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b="bwj0ySeu" Received: from mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:27a5:0:640:93ca:0]) by forward100d.mail.yandex.net (Yandex) with ESMTPS id 820AFC0060; Sat, 23 May 2026 08:15:21 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (smtp) with ESMTPSA id DFNL0fJe2Ko0-5t1CdBqY; Sat, 23 May 2026 08:15:21 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sezginduran.net; s=mail; t=1779513321; bh=a4zr0whGbEC/vxBsbOV/my1gAr3xzsNm+4oGW4TfPbc=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=bwj0ySeuWW5Skj1MQ3hpyIaYF9LLN5dOuOugdZXEFzFu9lGvI5TUI/k7d1eck3QK/ WzrkxEL5w9zlQNORHDxqqZNQyLxUeR7qiEg4EyGBsSeC7dU2iNo8Xk1bPGfZx0xVuG eu82rLtPy4e1qNq8GXDvvsisUobgHSH5glOyxX00= Authentication-Results: mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net; dkim=pass header.i=@sezginduran.net From: Ahmet Sezgin Duran To: gregkh@linuxfoundation.org Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ahmet Sezgin Duran Subject: [PATCH 3/5] staging: sm750fb: remove unused struct fields Date: Sat, 23 May 2026 05:15:07 +0000 Message-ID: <20260523051509.166152-4-ahmet@sezginduran.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260523051509.166152-1-ahmet@sezginduran.net> References: <20260523051509.166152-1-ahmet@sezginduran.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove `void *priv` pointer field in following struct definitions: - `struct lynxfb_crtc` - `struct lynxfb_output` Verified that no other code references them. No functional changes. Signed-off-by: Ahmet Sezgin Duran --- drivers/staging/sm750fb/sm750.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm75= 0.h index d2c522e67f26..56d7e1fa4557 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -145,8 +145,6 @@ struct lynxfb_crtc { u16 ypanstep; u16 ywrapstep; =20 - void *priv; - /* cursor information */ struct lynx_cursor cursor; }; @@ -168,7 +166,6 @@ struct lynxfb_output { * *channel=3D1 means secondary channel * output->channel =3D=3D> &crtc->channel */ - void *priv; }; =20 struct lynxfb_par { --=20 2.53.0 From nobody Sun May 24 19:35:39 2026 Received: from forward103d.mail.yandex.net (forward103d.mail.yandex.net [178.154.239.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD65132E6B8; Sat, 23 May 2026 05:15:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.214 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513333; cv=none; b=DpagXWw60UAUrCmr95ZRJO2y1zbVhdsqZLep6olmdrzYV/OpCHIUJn5xZ/456Zw0hwn5DSd8yDmntC4Ml5X/8FsTGzMRfWbZ1T6Sgv54wSNPcyqj88HkjBOfW7Ca1fIbs5UhaNVLoijvnm/EPtYVg5Iu1m3+ywj6f4pJcJa5kiw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513333; c=relaxed/simple; bh=tm+9vvsTReF3573YCo1i3Q/KWcCGV/4bLS6dafRlr9A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l2jkh2AG6BebEwKhZbGK6PEfEadXWGb9nHLjb6KaOtlx8bf//CGAJ0HsZsBGwFL5LXTuvEk02rrowvr0K8DEs8JWj80NC0TXBhF8p3H7kK5SH/IYNVrSRWKlffxRrOFEgE5Eb9c/oUQuEIKecLvIlNkBlD9tnF7rdmLJnb6K1a0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net; spf=pass smtp.mailfrom=sezginduran.net; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b=VspJ2Tlm; arc=none smtp.client-ip=178.154.239.214 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b="VspJ2Tlm" Received: from mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:27a5:0:640:93ca:0]) by forward103d.mail.yandex.net (Yandex) with ESMTPS id E2682C006C; Sat, 23 May 2026 08:15:22 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (smtp) with ESMTPSA id DFNL0fJe2Ko0-oobSE2Ow; Sat, 23 May 2026 08:15:22 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sezginduran.net; s=mail; t=1779513322; bh=r+U23zr9A1yaCGijp+/mJG1U0f98IpdMdSvDaEN04Z0=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=VspJ2TlmqHEjF6POqpguLrlCnsBg8Hb14BejmeIKmjQvOmeDKPoOHlNM10te0kLk+ xMIsJrybf5WRUwpmHlj0/jRA6cuTAUdMHBP60UZPA9KhQJrGdP9IZXKyduLVDIgrCl kIAlpz5jdXz7ld3bcXN1wP9ORZ2M39Zilt+/2wNE= Authentication-Results: mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net; dkim=pass header.i=@sezginduran.net From: Ahmet Sezgin Duran To: gregkh@linuxfoundation.org Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ahmet Sezgin Duran Subject: [PATCH 4/5] staging: sm750fb: use ARRAY_SIZE macro in fb_find_mode loop Date: Sat, 23 May 2026 05:15:08 +0000 Message-ID: <20260523051509.166152-5-ahmet@sezginduran.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260523051509.166152-1-ahmet@sezginduran.net> References: <20260523051509.166152-1-ahmet@sezginduran.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The loop in lynxfb_set_fbinfo() iterates over pdb[] and cdb[] using a hardcoded bound of 3. Replace it with ARRAY_SIZE(pdb) so the bound tracks the array. Signed-off-by: Ahmet Sezgin Duran --- drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm75= 0.c index fff9c35ee7b0..465615b528fd 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -764,7 +764,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int = index) g_fbmode[index] =3D g_fbmode[0]; } =20 - for (i =3D 0; i < 3; i++) { + for (i =3D 0; i < ARRAY_SIZE(pdb); i++) { ret =3D fb_find_mode(var, info, g_fbmode[index], pdb[i], cdb[i], NULL, 8); =20 --=20 2.53.0 From nobody Sun May 24 19:35:39 2026 Received: from forward201d.mail.yandex.net (forward201d.mail.yandex.net [178.154.239.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94F053EA66; Sat, 23 May 2026 05:21:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.220 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513663; cv=none; b=AO9ZRkYXTDbZlUanPuA5Ndxk0+91ldrJIHsLgHau2zszLdJHdDPwg63+ALMMmWO7lQ4HBdsWvrV6yUgM8Q1uO9MDKcqp+lk4QUm8oIqyQihNrSdEpqtUipfRL5QtjS3jJth6jSHM/ild4qoRc2+ym7CiFj6GjpgQD7fKi0VAvjc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779513663; c=relaxed/simple; bh=lRLTEhZDHzg1bMcQQyh+N6hTgp70dNNJqO0x7Gu1FpQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lrGBe127biVLW51UKHbjAQzoX12WspJSlhEKUrBO+r0jHhHwX7NSZsUkunOU3QmXnqz8hFuBCUUKviPNL7GWdKIEIM6yLkqmRNIfGCQti3+h7nZpqKV7HUZFYdEuwBZLiTf7vI/0Ve2X0ZNP1LPQZ+haMtJdxo2KK7mHcPhfd0M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net; spf=pass smtp.mailfrom=sezginduran.net; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b=O8Q/96CU; arc=none smtp.client-ip=178.154.239.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sezginduran.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sezginduran.net header.i=@sezginduran.net header.b="O8Q/96CU" Received: from forward101d.mail.yandex.net (forward101d.mail.yandex.net [IPv6:2a02:6b8:c41:1300:1:45:d181:d101]) by forward201d.mail.yandex.net (Yandex) with ESMTPS id 0476081180; Sat, 23 May 2026 08:15:32 +0300 (MSK) Received: from mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:27a5:0:640:93ca:0]) by forward101d.mail.yandex.net (Yandex) with ESMTPS id 57608C0041; Sat, 23 May 2026 08:15:24 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net (smtp) with ESMTPSA id DFNL0fJe2Ko0-DjBQ4v6g; Sat, 23 May 2026 08:15:23 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sezginduran.net; s=mail; t=1779513323; bh=zrl/uPh8XULY9xneCuXEdgDPlcjH+DMAp7B3cFGot8o=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=O8Q/96CUKkIS4WozKOQhe/YRn19hoITkLBYVQnNShY6NVw7pU8OoWPs8QM9OUdNcJ I0BEMg6OimqdDDuEf2uuXSKjK2aqyZqhBLJILV6vyF2DKePL/4/YWJHkjCKdg4qf7v HLvIbfOrbMVw31svlzVjkPgKd54ZJg/BmUevQG+o= Authentication-Results: mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net; dkim=pass header.i=@sezginduran.net From: Ahmet Sezgin Duran To: gregkh@linuxfoundation.org Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ahmet Sezgin Duran Subject: [PATCH 5/5] staging: sm750fb: deduplicate fbinfo loop in suspend/resume Date: Sat, 23 May 2026 05:15:09 +0000 Message-ID: <20260523051509.166152-6-ahmet@sezginduran.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260523051509.166152-1-ahmet@sezginduran.net> References: <20260523051509.166152-1-ahmet@sezginduran.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" lynxfb_suspend() and lynxfb_resume() both walk sm750_dev->fbinfo[] via duplicated per-index blocks for fbinfo[0] and fbinfo[1]. Replace each pair of blocks with a for-loop bounded by sm750_dev->fb_count, the number of successfully registered framebuffers. No functional changes intended. Signed-off-by: Ahmet Sezgin Duran --- drivers/staging/sm750fb/sm750.c | 34 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm75= 0.c index 465615b528fd..279471d6cd14 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -388,18 +388,18 @@ static int __maybe_unused lynxfb_suspend(struct devic= e *dev) { struct fb_info *info; struct sm750_dev *sm750_dev; + int i; =20 sm750_dev =3D dev_get_drvdata(dev); =20 console_lock(); - info =3D sm750_dev->fbinfo[0]; - if (info) - /* 1 means do suspend */ - fb_set_suspend(info, 1); - info =3D sm750_dev->fbinfo[1]; - if (info) - /* 1 means do suspend */ - fb_set_suspend(info, 1); + + for (i =3D 0; i < sm750_dev->fb_count; i++) { + info =3D sm750_dev->fbinfo[i]; + if (info) + /* 1 means do suspend */ + fb_set_suspend(info, 1); + } =20 console_unlock(); return 0; @@ -414,6 +414,7 @@ static int __maybe_unused lynxfb_resume(struct device *= dev) struct lynxfb_par *par; struct lynxfb_crtc *crtc; struct lynx_cursor *cursor; + int i; =20 sm750_dev =3D pci_get_drvdata(pdev); =20 @@ -421,21 +422,12 @@ static int __maybe_unused lynxfb_resume(struct device= *dev) =20 hw_sm750_inithw(sm750_dev, pdev); =20 - info =3D sm750_dev->fbinfo[0]; - - if (info) { - par =3D info->par; - crtc =3D &par->crtc; - cursor =3D &crtc->cursor; - memset_io(cursor->vstart, 0x0, cursor->size); - memset_io(crtc->v_screen, 0x0, crtc->vidmem_size); - lynxfb_ops_set_par(info); - fb_set_suspend(info, 0); - } + for (i =3D 0; i < sm750_dev->fb_count; i++) { + info =3D sm750_dev->fbinfo[i]; =20 - info =3D sm750_dev->fbinfo[1]; + if (!info) + continue; =20 - if (info) { par =3D info->par; crtc =3D &par->crtc; cursor =3D &crtc->cursor; --=20 2.53.0