linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: fix checkpatch.pl struct should normally be const
@ 2022-05-19 17:25 Uri Arev
  2022-05-19 20:09 ` Andy Shevchenko
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Uri Arev @ 2022-05-19 17:25 UTC (permalink / raw)
  Cc: Uri Arev, Greg Kroah-Hartman, Andy Shevchenko, Len Baker,
	Sam Ravnborg, Thomas Zimmermann, Uwe Kleine-König,
	Srivathsa Dara, Noralf Trønnes, dri-devel, linux-fbdev,
	linux-staging, linux-kernel

This simple patch fixes a checkpatch.pl warning in `fbtft/fbtft-core.c`.

Reported by Checkpatch:
WARNING: struct fb_ops should normally be const

Signed-off-by: Uri Arev <me@wantyapps.xyz>
---
 drivers/staging/fbtft/fbtft-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 9c4d797e7ae4..9ff2b8230caf 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -539,7 +539,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
 {
 	struct fb_info *info;
 	struct fbtft_par *par;
-	struct fb_ops *fbops = NULL;
+	const struct fb_ops *fbops = NULL;
 	struct fb_deferred_io *fbdefio = NULL;
 	u8 *vmem = NULL;
 	void *txbuf = NULL;
@@ -614,7 +614,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
 	if (!vmem)
 		goto alloc_fail;
 
-	fbops = devm_kzalloc(dev, sizeof(struct fb_ops), GFP_KERNEL);
+	const fbops = devm_kzalloc(dev, sizeof(struct fb_ops), GFP_KERNEL);
 	if (!fbops)
 		goto alloc_fail;
 
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-20  6:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-19 17:25 [PATCH] staging: fbtft: fix checkpatch.pl struct should normally be const Uri Arev
2022-05-19 20:09 ` Andy Shevchenko
2022-05-19 21:25 ` kernel test robot
2022-05-20  0:41 ` kernel test robot
2022-05-20  1:34 ` kernel test robot
2022-05-20  6:03 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).