Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp846182pxf; Wed, 7 Apr 2021 13:06:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjyN4t6+kom4TxRynE98LvM9lgcOd6GcS6PV4aAoMYrLKCihpXKmtbYp9cE4Owr+TZw/hk X-Received: by 2002:a05:6e02:1242:: with SMTP id j2mr3950576ilq.105.1617825989617; Wed, 07 Apr 2021 13:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617825989; cv=none; d=google.com; s=arc-20160816; b=RJmWXtyO8IDQSCNO/aKbB6XsmjVzyizteeHvijTIkVSoGNFHAvH+REBCX6CZLrPqFM wSNN0+uwLzGEOMba8E3+DZqYKf+8AY9gW6TT8sWKrSKDk8wLXMtnv+E9pBluhAD65lBe n3QeqW1vN5wp3e3ZdIvKKZMfaEmByRg4xr1tJzm0mIrqXTpAm1s7sKjcL3oygv7UURPJ yKdGBDspO0nTHMFxMGblzF3yr8Jd77uePf87WEijaaCoNszaxfBBxb6w9eB321zdJzxk atvothVHg4UEBs/PXN98ojdcRLCAyhSzdsMETEWeWaDqcy7WB0h2bhJ6IeOA1IcB+2vc Ls+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=LtPY28YFe+3bqh2kGpqagJA+l0TwkVBMvsxawK4Hef0=; b=mmer0rBRVPJWmvebFWp5/ASD8n6ut0ezZYkgCwPrecZ4h13XjngadoM3RL2JXbJ71N wEL9AtNrCzbnmxdc1ODh34ecsAv8jRNUgvXKh193mDdqsBirZkzw8uIwGv8L+khC3A1L DJd3h/1DozM0w/G4j2IXv9HT2lMAcygTkYL8sumAWSzHOHHerU14p6BuLNnT9/ad8dDY 7R8INtseNYnHyQCEQ6hxoPMP+WEBkuxc3D3h1PIbyQqNnFwvHolVTJ2/8RA+wzlvcQpb S8IHUyB/OHgmTa3/7eDC7EXWG4gpEVLSD02Y2TjxPInpw30NXlK0NRPn5BzQjJMk38uv XCsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CYnRpPpG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y24si21740161ioj.75.2021.04.07.13.05.59; Wed, 07 Apr 2021 13:06:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CYnRpPpG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349040AbhDGGnu (ORCPT + 99 others); Wed, 7 Apr 2021 02:43:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349025AbhDGGnr (ORCPT ); Wed, 7 Apr 2021 02:43:47 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41B54C061756; Tue, 6 Apr 2021 23:43:37 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id e10so4469756pls.6; Tue, 06 Apr 2021 23:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LtPY28YFe+3bqh2kGpqagJA+l0TwkVBMvsxawK4Hef0=; b=CYnRpPpGvYCCmiTofhHDTtc96f7jsJ2CxAMhz8TFl3QqnZjSOzhUZC0k3LQO8ht9r4 luCn6B+r6yV7wwp0bNBKeC4nb8Igj/eg8PoOWCPMXw4Ah6WUaOKNShg6JIW6ToaIQK/y qJSS0BMNv9FqDxNOvej/O2tBF5QRXk/OnV6xlO+tIY0WxBgJaslIW1t209bLdQyZY4ch Ck0kk2fF+8+tfYdTl2GkQLSmNQAgFUe0v1t4kOZ/vTI6hebiS0baQm5wmCV5yM2akAg5 DOkZ8WOpOKiC2XrByDRA2DnTJZvtXbZpdze1XpkeAJn+bId+YRIFY3uCdfhzlABraAAA 03OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LtPY28YFe+3bqh2kGpqagJA+l0TwkVBMvsxawK4Hef0=; b=bYutUC0rrynx9famI9eTtzCTbUMsk9gXw38ezhkP3PJ5+/0EiKGyNrnN5udRr80OSX UkEYw6v4+uh9fWl/IZv9J88/z+E97ij2GauHUA+vy0K0lG2pEb1JbQa2+igqUNUfd16L zFzs4Kse5PqXWLYcHlIy0f7UMR7mtY7Sr4BdTFcfpiionXxtXXCD7IsRWuBP2eEqHCOP q19GXsuJpDxXGroIVxa+m9mjb7qynN71nD7Ei+Gb6ArGgy3C/DHlot36XfRI9ds+sMaA ilP2vwiR/dEZ+Hjn2TftgejJu3gcBSiR9N4rXL7TFrZdHIMNvaJcDE9iLhuhEIFrmKKp ADmA== X-Gm-Message-State: AOAM533Xh91JFSB9Er1BiSfHzTkHdQpb6g8uPHylYZzY+KW1I3h68bAA 2qM4pWWkkyW1e3WDcsdU5+Y= X-Received: by 2002:a17:90a:6c45:: with SMTP id x63mr1834472pjj.138.1617777816772; Tue, 06 Apr 2021 23:43:36 -0700 (PDT) Received: from localhost.localdomain ([134.173.248.5]) by smtp.gmail.com with ESMTPSA id f16sm18655210pfj.220.2021.04.06.23.43.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Apr 2021 23:43:36 -0700 (PDT) Date: Tue, 6 Apr 2021 23:43:34 -0700 From: Pavle Rohalj To: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com, gregkh@linuxfoundation.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 20/49] staging: sm750fb: Update function parameter names to snake case Message-ID: <80a0c8c1d020da11e458d197d155a6296c090ad5.1617776878.git.pavle.rohalj@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix "Avoid CamelCase" checkpatch.pl checks for function parameter names in sm750_accel.c. Signed-off-by: Pavle Rohalj --- drivers/staging/sm750fb/sm750_accel.c | 92 +++++++++++++-------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c index 8faa601c700b..4327bda871e1 100644 --- a/drivers/staging/sm750fb/sm750_accel.c +++ b/drivers/staging/sm750fb/sm750_accel.c @@ -18,9 +18,9 @@ #include "sm750.h" #include "sm750_accel.h" -static inline void write_dpr(struct lynx_accel *accel, int offset, u32 regValue) +static inline void write_dpr(struct lynx_accel *accel, int offset, u32 reg_value) { - writel(regValue, accel->dprBase + offset); + writel(reg_value, accel->dprBase + offset); } static inline u32 read_dpr(struct lynx_accel *accel, int offset) @@ -86,7 +86,7 @@ void sm750_hw_set2dformat(struct lynx_accel *accel, int fmt) } int sm750_hw_fillrect(struct lynx_accel *accel, - u32 base, u32 pitch, u32 Bpp, + u32 base, u32 pitch, u32 bpp, u32 x, u32 y, u32 width, u32 height, u32 color, u32 rop) { @@ -103,14 +103,14 @@ int sm750_hw_fillrect(struct lynx_accel *accel, write_dpr(accel, DE_WINDOW_DESTINATION_BASE, base); /* dpr40 */ write_dpr(accel, DE_PITCH, - ((pitch / Bpp << DE_PITCH_DESTINATION_SHIFT) & + ((pitch / bpp << DE_PITCH_DESTINATION_SHIFT) & DE_PITCH_DESTINATION_MASK) | - (pitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */ + (pitch / bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */ write_dpr(accel, DE_WINDOW_WIDTH, - ((pitch / Bpp << DE_WINDOW_WIDTH_DST_SHIFT) & + ((pitch / bpp << DE_WINDOW_WIDTH_DST_SHIFT) & DE_WINDOW_WIDTH_DST_MASK) | - (pitch / Bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr44 */ + (pitch / bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr44 */ write_dpr(accel, DE_FOREGROUND, color); /* DPR14 */ @@ -132,13 +132,13 @@ int sm750_hw_fillrect(struct lynx_accel *accel, /** * sm750_hm_copyarea - * @sBase: Address of source: offset in frame buffer - * @sPitch: Pitch value of source surface in BYTE + * @s_base: Address of source: offset in frame buffer + * @s_pitch: Pitch value of source surface in BYTE * @sx: Starting x coordinate of source surface * @sy: Starting y coordinate of source surface - * @dBase: Address of destination: offset in frame buffer - * @dPitch: Pitch value of destination surface in BYTE - * @Bpp: Color depth of destination surface + * @d_base: Address of destination: offset in frame buffer + * @d_pitch: Pitch value of destination surface in BYTE + * @bpp: Color depth of destination surface * @dx: Starting x coordinate of destination surface * @dy: Starting y coordinate of destination surface * @width: width of rectangle in pixel value @@ -146,10 +146,10 @@ int sm750_hw_fillrect(struct lynx_accel *accel, * @rop2: ROP value */ int sm750_hw_copyarea(struct lynx_accel *accel, - unsigned int sBase, unsigned int sPitch, + unsigned int s_base, unsigned int s_pitch, unsigned int sx, unsigned int sy, - unsigned int dBase, unsigned int dPitch, - unsigned int Bpp, unsigned int dx, unsigned int dy, + unsigned int d_base, unsigned int d_pitch, + unsigned int bpp, unsigned int dx, unsigned int dy, unsigned int width, unsigned int height, unsigned int rop2) { @@ -160,7 +160,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel, de_ctrl = 0; /* If source and destination are the same surface, need to check for overlay cases */ - if (sBase == dBase && sPitch == dPitch) { + if (s_base == d_base && s_pitch == d_pitch) { /* Determine direction of operation */ if (sy < dy) { /* +----------+ @@ -234,14 +234,14 @@ int sm750_hw_copyarea(struct lynx_accel *accel, * It is an address offset (128 bit aligned) * from the beginning of frame buffer. */ - write_dpr(accel, DE_WINDOW_SOURCE_BASE, sBase); /* dpr40 */ + write_dpr(accel, DE_WINDOW_SOURCE_BASE, s_base); /* dpr40 */ /* * 2D Destination Base. * It is an address offset (128 bit aligned) * from the beginning of frame buffer. */ - write_dpr(accel, DE_WINDOW_DESTINATION_BASE, dBase); /* dpr44 */ + write_dpr(accel, DE_WINDOW_DESTINATION_BASE, d_base); /* dpr44 */ /* * Program pitch (distance between the 1st points of two adjacent lines). @@ -249,9 +249,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel, * pixel values. Need Byte to pixel conversion. */ write_dpr(accel, DE_PITCH, - ((dPitch / Bpp << DE_PITCH_DESTINATION_SHIFT) & + ((d_pitch / bpp << DE_PITCH_DESTINATION_SHIFT) & DE_PITCH_DESTINATION_MASK) | - (sPitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */ + (s_pitch / bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */ /* * Screen Window width in Pixels. @@ -259,9 +259,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel, * for a given point. */ write_dpr(accel, DE_WINDOW_WIDTH, - ((dPitch / Bpp << DE_WINDOW_WIDTH_DST_SHIFT) & + ((d_pitch / bpp << DE_WINDOW_WIDTH_DST_SHIFT) & DE_WINDOW_WIDTH_DST_MASK) | - (sPitch / Bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr3c */ + (s_pitch / bpp & DE_WINDOW_WIDTH_SRC_MASK)); /* dpr3c */ if (accel->de_wait() != 0) return -1; @@ -298,26 +298,26 @@ static unsigned int deGetTransparency(struct lynx_accel *accel) /** * sm750_hw_imageblit - * @pSrcbuf: pointer to start of source buffer in system memory - * @srcDelta: Pitch value (in bytes) of the source buffer, +ive means top down + * @src_buf: pointer to start of source buffer in system memory + * @src_delta: Pitch value (in bytes) of the source buffer, +ive means top down * and -ive mean button up - * @startBit: Mono data can start at any bit in a byte, this value should be + * @start_bit: Mono data can start at any bit in a byte, this value should be * 0 to 7 - * @dBase: Address of destination: offset in frame buffer - * @dPitch: Pitch value of destination surface in BYTE - * @bytePerPixel: Color depth of destination surface + * @d_base: Address of destination: offset in frame buffer + * @d_pitch: Pitch value of destination surface in BYTE + * @byte_per_pixel: Color depth of destination surface * @dx: Starting x coordinate of destination surface * @dy: Starting y coordinate of destination surface * @width: width of rectangle in pixel value * @height: height of rectangle in pixel value * @fColor: Foreground color (corresponding to a 1 in the monochrome data - * @bColor: Background color (corresponding to a 0 in the monochrome data + * @b_olor: Background color (corresponding to a 0 in the monochrome data * @rop2: ROP value */ -int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf, - u32 srcDelta, u32 startBit, u32 dBase, u32 dPitch, - u32 bytePerPixel, u32 dx, u32 dy, u32 width, - u32 height, u32 fColor, u32 bColor, u32 rop2) +int sm750_hw_imageblit(struct lynx_accel *accel, const char *src_buf, + u32 src_delta, u32 start_bit, u32 d_base, u32 d_pitch, + u32 byte_per_pixel, u32 dx, u32 dy, u32 width, + u32 height, u32 fColor, u32 b_olor, u32 rop2) { unsigned int ulBytesPerScan; unsigned int ul4BytesPerScan; @@ -326,8 +326,8 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf, unsigned char ajRemain[4]; int i, j; - startBit &= 7; /* Just make sure the start bit is within legal range */ - ulBytesPerScan = (width + startBit + 7) / 8; + start_bit &= 7; /* Just make sure the start bit is within legal range */ + ulBytesPerScan = (width + start_bit + 7) / 8; ul4BytesPerScan = ulBytesPerScan & ~3; ulBytesRemain = ulBytesPerScan & 3; @@ -344,7 +344,7 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf, * It is an address offset (128 bit aligned) * from the beginning of frame buffer. */ - write_dpr(accel, DE_WINDOW_DESTINATION_BASE, dBase); + write_dpr(accel, DE_WINDOW_DESTINATION_BASE, d_base); /* * Program pitch (distance between the 1st points of two adjacent @@ -352,9 +352,9 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf, * register uses pixel values. Need Byte to pixel conversion. */ write_dpr(accel, DE_PITCH, - ((dPitch / bytePerPixel << DE_PITCH_DESTINATION_SHIFT) & + ((d_pitch / byte_per_pixel << DE_PITCH_DESTINATION_SHIFT) & DE_PITCH_DESTINATION_MASK) | - (dPitch / bytePerPixel & DE_PITCH_SOURCE_MASK)); /* dpr10 */ + (d_pitch / byte_per_pixel & DE_PITCH_SOURCE_MASK)); /* dpr10 */ /* * Screen Window width in Pixels. @@ -362,17 +362,17 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf, * in frame buffer for a given point. */ write_dpr(accel, DE_WINDOW_WIDTH, - ((dPitch / bytePerPixel << DE_WINDOW_WIDTH_DST_SHIFT) & + ((d_pitch / byte_per_pixel << DE_WINDOW_WIDTH_DST_SHIFT) & DE_WINDOW_WIDTH_DST_MASK) | - (dPitch / bytePerPixel & DE_WINDOW_WIDTH_SRC_MASK)); + (d_pitch / byte_per_pixel & DE_WINDOW_WIDTH_SRC_MASK)); /* * Note: For 2D Source in Host Write, only X_K1_MONO field is needed, * and Y_K2 field is not used. - * For mono bitmap, use startBit for X_K1. + * For mono bitmap, use start_bit for X_K1. */ write_dpr(accel, DE_SOURCE, - (startBit << DE_SOURCE_X_K1_SHIFT) & + (start_bit << DE_SOURCE_X_K1_SHIFT) & DE_SOURCE_X_K1_MONO_MASK); /* dpr00 */ write_dpr(accel, DE_DESTINATION, @@ -384,7 +384,7 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf, (height & DE_DIMENSION_Y_ET_MASK)); /* dpr08 */ write_dpr(accel, DE_FOREGROUND, fColor); - write_dpr(accel, DE_BACKGROUND, bColor); + write_dpr(accel, DE_BACKGROUND, b_olor); de_ctrl = (rop2 & DE_CONTROL_ROP_MASK) | DE_CONTROL_ROP_SELECT | DE_CONTROL_COMMAND_HOST_WRITE | @@ -396,15 +396,15 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf, for (i = 0; i < height; i++) { /* For each line, send the data in chunks of 4 bytes */ for (j = 0; j < (ul4BytesPerScan / 4); j++) - write_dpPort(accel, *(unsigned int *)(pSrcbuf + (j * 4))); + write_dpPort(accel, *(unsigned int *)(src_buf + (j * 4))); if (ulBytesRemain) { - memcpy(ajRemain, pSrcbuf + ul4BytesPerScan, + memcpy(ajRemain, src_buf + ul4BytesPerScan, ulBytesRemain); write_dpPort(accel, *(unsigned int *)ajRemain); } - pSrcbuf += srcDelta; + src_buf += src_delta; } return 0; -- 2.30.2