Skip to content

Commit 0e8cf2b

Browse files
andy-shevgregkh
authored andcommitted
staging: fbtft: Constify buf parameter in fbtft_dbg_hex()
It's obvious that we don't and shouldn't modify buffer that is about to be dumped. Constify parameter in fbtft_dbg_hex() to make it clear. Fixes: c296d5f ("staging: fbtft: core support") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220316165351.58107-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9b63000 commit 0e8cf2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/staging/fbtft/fbtft-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int fbtft_write_buf_dc(struct fbtft_par *par, void *buf, size_t len, int dc)
4949
EXPORT_SYMBOL(fbtft_write_buf_dc);
5050

5151
void fbtft_dbg_hex(const struct device *dev, int groupsize,
52-
void *buf, size_t len, const char *fmt, ...)
52+
const void *buf, size_t len, const char *fmt, ...)
5353
{
5454
va_list args;
5555
static char textbuf[512];

drivers/staging/fbtft/fbtft.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ struct fbtft_par {
240240
int fbtft_write_buf_dc(struct fbtft_par *par, void *buf, size_t len, int dc);
241241
__printf(5, 6)
242242
void fbtft_dbg_hex(const struct device *dev, int groupsize,
243-
void *buf, size_t len, const char *fmt, ...);
243+
const void *buf, size_t len, const char *fmt, ...);
244244
struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
245245
struct device *dev,
246246
struct fbtft_platform_data *pdata);

0 commit comments

Comments
 (0)