From patchwork Tue Apr 16 20:14:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashok Kumar X-Patchwork-Id: 13632516 Received: from sonic310-24.consmr.mail.ne1.yahoo.com (sonic310-24.consmr.mail.ne1.yahoo.com [66.163.186.205]) (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 D18AF139CF1 for ; Tue, 16 Apr 2024 20:15:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.163.186.205 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713298504; cv=none; b=IcSBUZaFUw3Ss1btiHq5E8oIXfMcjHszHYFPQQjcRT5w1WjboKAYd4l+rMQ/hT7O6i3ne5tvK2FrBker6glwlJ0qGOqnukgWpk2wiItGqDVA7QDdMtPH6G3iTY8soXtFTTQe7HapQaTh4//DeK5CO+sTfeeHAe+YgMI/xkhlXXY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713298504; c=relaxed/simple; bh=QOAxSxqPb8aM2I8dIMb9zaaMs0lLOwqGvQ0uU6Di4W8=; h=Message-ID:Subject:From:To:Date:Content-Type:MIME-Version: References; b=soY+0bcT006xN20M00sJ+BMv7Er8kXi7Ox4SN0s9oW4tpFfggeBAQOF5Jc+MH+4isFMGa9z5jaYxXl4JFnITBi1u0EMvxy6zipWpW1lH+mAtqYcpE8OkFQAkKVDp8mEG4ndMDSNTWxkCiL8hKkRCHlXUTEK0yZccYxOPH3yjVyg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=B4EKl7sK; arc=none smtp.client-ip=66.163.186.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="B4EKl7sK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1713298495; bh=iZgtGGZ+o2qQOMTF6tCLpgz1PmbtD2vBGZSP/gGVln0=; h=Subject:From:To:Date:References:From:Subject:Reply-To; b=B4EKl7sKCyiEi7IfleyQbwq/fvyU7ZcHZ9WO/LLg4B3Hxlx1Zsl4GxAcZwbOW8YTiUWWLRZ3uMrZQxSiFVkhW2N8YdNVcxNV5eNx77/3I3OrQE6Bzn9ZNZz7iTab1sxwD9VpD6B8BmVXJIm7Ye0obhXL562MU+GL0HsJkrUb9TGHzuMue/mjZARgjsjSL+YhRQBKHX4CyCAsQkQmgTQzZcPeoEO+Efw1FQ6EV5O7PXaffl00+l1nO7Y2QsjDhYPN8zNonBIurrTViPhblXvZnrRq0fxEb9UneDQ9GYw/CncdjOTALXBudRDTNjNzNgkk2JmNurW7+ggMfwIpbJiWOw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1713298495; bh=PW1mmMDFh3DNKfOKZFou1Dz2YeRrclHmgXlImryPW7v=; h=X-Sonic-MF:Subject:From:To:Date:From:Subject; b=MQD9A6H/llQn2sxcvGLKqiuBN+a6wyeW8TdbwAQDCHUZIn3rb23u88tqVMa0zAEt1LkN+N4kiricxrvCfDzl64NiK7EcdmZqGDvINyaW0Xo30PEmk57tSEQ4Mmrqf4tKyTzbZe1RNEnepZSWZ6BTm6CnCn/fBhuoL4MV9dqbxmifIcs9Djo2CQ37/Jl4wvc4ZMHR9Z8688qhzymzFCVTvZhaFg0CNxkX4Q5naXIB7TBtI8mZgtNyH9e/WUyu4gzIAJr1rr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vPxLwEm.nZHaNhWxAMCBwZXUQWxVqF2KG_RhNFSkK2qrPcjmLW0KmU.mf5 ZgVj_UwpZLsMPWYrpFaXw0OtMH733LsTEjwJ5YnmXM6wMM1BYcshi5he_b1jaNYSk8FERob4DyYk Id1f3BbcpEAKvn2HWQIR7fsXclAsGS7BTn8OXNJd9UznMlOj1UyndHhEFZ_igewkxBp37VLV0Kxt sKfH0dTYNIDsTprxqbNFp8JQsXZKsgp4.F09Aml7az1OzJSrvbECuojGf5oBPsadvgmST.Lgd_gz GARoauBtmLG7Nas_mzVIYWZRweWo43xFkeXRtTKAknig- X-Sonic-MF: X-Sonic-ID: e776ce5b-2ecd-4172-a11d-16b719dd513e Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Tue, 16 Apr 2024 20:14:55 +0000 Received: by hermes--production-bf1-5cc9fc94c8-tmzjr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f7cd3a3627d699b4c5bb0c83112631a2; Tue, 16 Apr 2024 20:14:54 +0000 (UTC) Message-ID: Subject: [PATCH] staging: fbtft Removed redundant parentheses From: A To: Greg Kroah-Hartman , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Date: Tue, 16 Apr 2024 13:14:52 -0700 User-Agent: Evolution 3.44.4-0ubuntu2 Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: X-Mailer: WebService/1.1.22205 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo From 6dbcb120581fc7cb45812193227b0a197abd8ba4 Mon Sep 17 00:00:00 2001 From: Ashok Kumar Date: Tue, 16 Apr 2024 09:19:32 -0700 Subject: [PATCH] [PATCH] staging: fbtft Removed redundant parentheses on logical expr Adhere to Linux Kernel coding style removed redundant parentheses, multiple blank lines and indentation alignment. Reported by checkpatch.pl ------ fb_ili9320.c + if ((devcode != 0x0000) && (devcode != 0x9320)) ------ fb_ra8875.c CHECK: Unnecessary parentheses around 'par->info->var.xres == 320' + if ((par->info->var.xres == 320) && (par->info->var.yres == 240)) { ------ fb_ssd1325.c CHECK: Please don't use multiple blank lines ------ fb_tinylcd.c - indentation adjustment ----- fbtft-bus.c CHECK: Unnecessary parentheses around 'par->spi->bits_per_word == 8' ------ fbtft-core.c CHECK: Please don't use multiple blank lines CHECK: Unnecessary parentheses around '!txbuflen' CHECK: Please don't use multiple blank lines ------ Signed-off-by: Ashok Kumar --- drivers/staging/fbtft/fb_ili9320.c | 2 +- drivers/staging/fbtft/fb_ra8875.c | 8 ++++---- drivers/staging/fbtft/fb_ssd1325.c | 2 -- drivers/staging/fbtft/fb_tinylcd.c | 2 +- drivers/staging/fbtft/fbtft-bus.c | 6 +++--- drivers/staging/fbtft/fbtft-core.c | 7 +------ 6 files changed, 10 insertions(+), 17 deletions(-) #endif @@ -1053,8 +1051,6 @@ static int fbtft_verify_gpios(struct fbtft_par *par) struct fbtft_platform_data *pdata = par->pdata; int i; - fbtft_par_dbg(DEBUG_VERIFY_GPIOS, par, "%s()\n", __func__); - if (pdata->display.buswidth != 9 && par->startbyte == 0 && !par->gpio.dc) { dev_err(par->info->device, @@ -1159,7 +1155,6 @@ int fbtft_probe_common(struct fbtft_display *display, dev = &pdev->dev; if (unlikely(display->debug & DEBUG_DRIVER_INIT_FUNCTIONS)) - dev_info(dev, "%s()\n", __func__); pdata = dev->platform_data; if (!pdata) { diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c index 0be7c2d51548..409b54cc562e 100644 --- a/drivers/staging/fbtft/fb_ili9320.c +++ b/drivers/staging/fbtft/fb_ili9320.c @@ -37,7 +37,7 @@ static int init_display(struct fbtft_par *par) devcode = read_devicecode(par); fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "Device code: 0x%04X\n", devcode); - if ((devcode != 0x0000) && (devcode != 0x9320)) + if (devcode != 0x0000 && devcode != 0x9320) dev_warn(par->info->device, "Unrecognized Device code: 0x%04X (expected 0x9320)\n", devcode); diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c index 398bdbf53c9a..4b79fb48c5f0 100644 --- a/drivers/staging/fbtft/fb_ra8875.c +++ b/drivers/staging/fbtft/fb_ra8875.c @@ -50,7 +50,7 @@ static int init_display(struct fbtft_par *par) par->fbtftops.reset(par); - if ((par->info->var.xres == 320) && (par->info->var.yres == 240)) { + if (par->info->var.xres == 320 && par->info->var.yres == 240) { /* PLL clock frequency */ write_reg(par, 0x88, 0x0A); write_reg(par, 0x89, 0x02); @@ -74,8 +74,8 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0x1D, 0x0E); write_reg(par, 0x1E, 0x00); write_reg(par, 0x1F, 0x02); - } else if ((par->info->var.xres == 480) && - (par->info->var.yres == 272)) { + } else if (par->info->var.xres == 480 && + par->info->var.yres == 272) { /* PLL clock frequency */ write_reg(par, 0x88, 0x0A); write_reg(par, 0x89, 0x02); @@ -111,7 +111,7 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0x04, 0x01); mdelay(1); /* horizontal settings */ - write_reg(par, 0x14, 0x4F); +write_reg(par, 0x14, 0x4F); write_reg(par, 0x15, 0x05); write_reg(par, 0x16, 0x0F); write_reg(par, 0x17, 0x01); diff --git a/drivers/staging/fbtft/fb_ssd1325.c b/drivers/staging/fbtft/fb_ssd1325.c index 796a2ac3e194..69aa808c7e23 100644 --- a/drivers/staging/fbtft/fb_ssd1325.c +++ b/drivers/staging/fbtft/fb_ssd1325.c @@ -109,8 +109,6 @@ static int set_gamma(struct fbtft_par *par, u32 *curves) { int i; - fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); - for (i = 0; i < GAMMA_LEN; i++) { if (i > 0 && curves[i] < 1) { dev_err(par->info->device, diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c index 9469248f2c50..60cda57bcb33 100644 --- a/drivers/staging/fbtft/fb_tinylcd.c +++ b/drivers/staging/fbtft/fb_tinylcd.c @@ -38,7 +38,7 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0xE5, 0x00); write_reg(par, 0xF0, 0x36, 0xA5, 0x53); write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00, - 0x00, 0x35, 0x33, 0x00, 0x00, 0x00); + 0x00, 0x35, 0x33, 0x00, 0x00, 0x00); write_reg(par, MIPI_DCS_SET_PIXEL_FORMAT, 0x55); write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE); udelay(250); diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index 3d422bc11641..02d7dbd38678 100644 --- a/drivers/staging/fbtft/fbtft-bus.c +++ b/drivers/staging/fbtft/fbtft-bus.c @@ -62,9 +62,9 @@ out: \ } \ EXPORT_SYMBOL(func); -define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, ) +define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8,) define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16) -define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, ) +define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16,) void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...) { @@ -85,7 +85,7 @@ void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...) if (len <= 0) return; - if (par->spi && (par->spi->bits_per_word == 8)) { + if (par->spi && par->spi->bits_per_word == 8) { /* we're emulating 9-bit, pad start of buffer with no- ops * (assuming here that zero is a no-op) */ diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 38845f23023f..98ffca49df81 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -216,8 +216,6 @@ static void fbtft_reset(struct fbtft_par *par) if (!par->gpio.reset) return; - fbtft_par_dbg(DEBUG_RESET, par, "%s()\n", __func__); - gpiod_set_value_cansleep(par->gpio.reset, 1); usleep_range(20, 40); gpiod_set_value_cansleep(par->gpio.reset, 0); @@ -667,7 +665,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, txbuflen = 0; #ifdef __LITTLE_ENDIAN - if ((!txbuflen) && (bpp > 8)) + if (!txbuflen && bpp > 8) txbuflen = PAGE_SIZE; /* need buffer for byteswapping */