From patchwork Mon Jul 26 13:15:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Philip X-Patchwork-Id: 487060 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E1E6C432BE for ; Mon, 26 Jul 2021 13:16:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E2206056C for ; Mon, 26 Jul 2021 13:16:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233607AbhGZMgW (ORCPT ); Mon, 26 Jul 2021 08:36:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbhGZMgV (ORCPT ); Mon, 26 Jul 2021 08:36:21 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5C7EC061757; Mon, 26 Jul 2021 06:16:49 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id k4-20020a17090a5144b02901731c776526so19680592pjm.4; Mon, 26 Jul 2021 06:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F1UL54kq9P3B03/zrEaHmiJVQdBboZhMIM+Kjok0NDY=; b=C36NpbPuZKpV5iBQACQRJs+XclqHKt1igprkGySAlIR/vKUdiam2f2wpzXiM9oAgLB UbSij7LBho010HkJrW0cJ20MxTwygttVWZezEC/ABMzCgiIc6FUi/cizAgMnrEVLQwAU uvOX/ZBn4xSC7cVFaDkfXaxGjk0qzrVrcfL6/B3xuQkhgkznMo/efyksYpCgSdolHBVa BN73oKkbOYezCBipnAjxbwJIFvTjPL8y7QiKMATPmFU5HE7S5gQVsJjKRdg4BcufxqOa T7bwhJK89qZIthhQ/iNGHxSgKK8Pgfx92k8CVFaKTsACfOZYTRv/XeADVXNbCMaIx/Hf 4Ylg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F1UL54kq9P3B03/zrEaHmiJVQdBboZhMIM+Kjok0NDY=; b=V+BJdoyQA6pZH9ClcBNrLk5cwcFUGdLaGBFbf9d/9vwZwgdw4LSk72ErSwWxbWzkFU qV2VCSihSUqYzZEOXGvLESc05QQgUWRaNPG41iJeO2dopqpIhkmc7gJnunFYOk+Br2o3 +RVus/6yVhNSG6yXqgzL4H8564RnaVxyFAoPz+pjGhhLdsoVrh3hW0485rSK4xFNRkbS eqYbuQ2WPWJXXlBzMXG/+NgpDcra8xep+YFNUQVEgEzXvEOzWQU2PcG3u2ghJTjdxwza buFrPz0U/vxqb5yf9sUGoS9cHS+lPQvDNMJwRLkf8iQ2tbbLv2fPYGPQhXomP8igbSkn Oj4w== X-Gm-Message-State: AOAM5308+bCC159JnC2roAsgNb2Ei+AW3ZaEmYiAUrFhiUl7cLUwiU31 HAB+TI9u5zICxU5tClpQr3A= X-Google-Smtp-Source: ABdhPJx6eIHRutchmLGiKkUgbUcc8PSZS2vs88kH6Qdf5R8BfIa1c+bA5sI1Af5TgvyeuP1StPY3aw== X-Received: by 2002:a17:90a:f690:: with SMTP id cl16mr13519662pjb.164.1627305409475; Mon, 26 Jul 2021 06:16:49 -0700 (PDT) Received: from localhost.localdomain ([2402:e280:2130:198:9b25:1cfb:9ff3:2a8f]) by smtp.gmail.com with ESMTPSA id c12sm12070869pfl.56.2021.07.26.06.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:16:49 -0700 (PDT) From: Benjamin Philip To: Sudip Mukherjee , Teddy Wang , Greg Kroah-Hartman Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Benjamin Philip Subject: [PATCH 1/2] staging: sm750fb: Rename maxH to max_h in lynx_cursor Date: Mon, 26 Jul 2021 18:45:01 +0530 Message-Id: <692211000786d76aa41bc24d4ee06b5868d82771.1627304144.git.benjamin.philip495@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The struct lynx_cursor has a member named maxH. This name is CamelCase and is frowned upon. This commit renames it to max_h and makes the necessary changes for the module to build. This change also fixes the following checkpatch CHECK: CHECK: Avoid CamelCase: 116: FILE: drivers/staging/sm750fb/sm750.c:116: + fbcursor->image.height > cursor->maxH || Signed-off-by: Benjamin Philip --- drivers/staging/sm750fb/sm750.c | 6 +++--- drivers/staging/sm750fb/sm750.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index c237a8f8eb59..ee9ee2857f00 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -113,7 +113,7 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) cursor = &crtc->cursor; if (fbcursor->image.width > cursor->maxW || - fbcursor->image.height > cursor->maxH || + fbcursor->image.height > cursor->max_h || fbcursor->image.depth > 1) { return -ENXIO; } @@ -723,8 +723,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) 0x800f0 + (int)crtc->channel * 0x140; pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); - crtc->cursor.maxH = crtc->cursor.maxW = 64; - crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW * 2 / 8; + crtc->cursor.max_h = crtc->cursor.maxW = 64; + crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.maxW * 2 / 8; crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset; memset_io(crtc->cursor.vstart, 0, crtc->cursor.size); diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 23eefd019ec9..5556208f7178 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -123,7 +123,7 @@ struct lynx_cursor { int size; /* hardware limitation */ int maxW; - int maxH; + int max_h; /* base virtual address and offset of cursor image */ char __iomem *vstart; int offset; From patchwork Mon Jul 26 13:15:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Philip X-Patchwork-Id: 486035 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8FC3C432BE for ; Mon, 26 Jul 2021 13:16:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A84F96056C for ; Mon, 26 Jul 2021 13:16:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233656AbhGZMgZ (ORCPT ); Mon, 26 Jul 2021 08:36:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbhGZMgY (ORCPT ); Mon, 26 Jul 2021 08:36:24 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A96CDC061757; Mon, 26 Jul 2021 06:16:52 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id u9-20020a17090a1f09b029017554809f35so19678627pja.5; Mon, 26 Jul 2021 06:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tKvZR1AeK2etahyjDlfPtU4YJhGm6x6glPkXtI2NAaA=; b=U49J3pSHmtIMW1xIjiWIVxKFZVdv3/nZj+kjYNwd+XzjiEBNcgR6D9uEejSxV8dlV5 DOYTj2IWgewXV0QfFt62n7M3NWkBlI23QkFQlUppFr1yTrPWVbYUHcYUg3To6rLWIMZD 1bkCnE2vo5b+Gvy/kQhzFYZZ45jfxUAiNyEnQndSNL8Y97TzqaBajnuTweTmlOEoyRjn +OMTtlhp8sv5dzWwRpN2PVleFxFhM2g1S8OiiwweXL2N6OrWXTlpraX+wd4TZ7yxmyra 326BsyL2OwpLximb/BPRcHi3ho39b88lnECYhbcUAqyRT84NOlRF7U+dSb1eE6BezqCz aZYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tKvZR1AeK2etahyjDlfPtU4YJhGm6x6glPkXtI2NAaA=; b=Opb+wfsYYM2Uz52xVdKcFPxCgJLaiRCUwzqb7CaLAA1+BXoXp111Kwqxld4GcQ8KuB RdPo+H5McR1kxhgZsf5PjUhQ0Du5JnFUuUoIHuSYeGfbanA2b2kdK9I27+E4Y/K6TaFQ 5K55U5B/k+53rMr38qFols6p70wHq5rfQU1FbTKA9ZBawrCQIsohjyF3de/1FDQeneFn ZOraJXWWXxidFEgCfZRCLzMT5rcdr00BTuZZMoVzjIL6NO04K6G3Eb8C13O3pP+BZF8s pl6O/eQdVcTT7yk4yMUl5fRAqYr7XKhAvny/76Kp1MLww/D0gUfPs33mU3c7bkiIKSqq TPOg== X-Gm-Message-State: AOAM532/t61VuE2rG32CV+fjP8eTe2OKdPvwKEIehezH3usi/N8iew8w 7bc7x5sq7640F4jfr7rh0Bw= X-Google-Smtp-Source: ABdhPJxwY1HAUM1CXV+EQT5VI+spGgh/AfS/lkrXy6Bnrcax21qBEpAuoGxI5vqoF50Zajo4xxcNEQ== X-Received: by 2002:a05:6a00:b46:b029:334:54db:af17 with SMTP id p6-20020a056a000b46b029033454dbaf17mr18049626pfo.26.1627305412250; Mon, 26 Jul 2021 06:16:52 -0700 (PDT) Received: from localhost.localdomain ([2402:e280:2130:198:9b25:1cfb:9ff3:2a8f]) by smtp.gmail.com with ESMTPSA id c12sm12070869pfl.56.2021.07.26.06.16.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:16:52 -0700 (PDT) From: Benjamin Philip To: Sudip Mukherjee , Teddy Wang , Greg Kroah-Hartman Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Benjamin Philip Subject: [PATCH 2/2] staging: sm750fb: Rename maxW to max_w in lynx_cursor Date: Mon, 26 Jul 2021 18:45:02 +0530 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The struct lynx_cursor has a member named maxW. This name is CamelCase and is frowned upon. This commit renames it to max_w and makes the necessary changes for the module to build. This change also fixes the following checkpatch CHECK: CHECK: Avoid CamelCase: 115: FILE: drivers/staging/sm750fb/sm750.c:115: + if (fbcursor->image.width > cursor->maxW || Signed-off-by: Benjamin Philip --- drivers/staging/sm750fb/sm750.c | 6 +++--- drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_cursor.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index ee9ee2857f00..4f5f68e6aa60 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -112,7 +112,7 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) crtc = &par->crtc; cursor = &crtc->cursor; - if (fbcursor->image.width > cursor->maxW || + if (fbcursor->image.width > cursor->max_w || fbcursor->image.height > cursor->max_h || fbcursor->image.depth > 1) { return -ENXIO; @@ -723,8 +723,8 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) 0x800f0 + (int)crtc->channel * 0x140; pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); - crtc->cursor.max_h = crtc->cursor.maxW = 64; - crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.maxW * 2 / 8; + crtc->cursor.max_h = crtc->cursor.max_w = 64; + crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w * 2 / 8; crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset; memset_io(crtc->cursor.vstart, 0, crtc->cursor.size); diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 5556208f7178..8271cf7c89f3 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -122,7 +122,7 @@ struct lynx_cursor { int h; int size; /* hardware limitation */ - int maxW; + int max_w; int max_h; /* base virtual address and offset of cursor image */ char __iomem *vstart; diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c index bbbef27cb329..43e6f52c2551 100644 --- a/drivers/staging/sm750fb/sm750_cursor.c +++ b/drivers/staging/sm750fb/sm750_cursor.c @@ -97,7 +97,7 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop, count = pitch * cursor->h; /* in byte */ - offset = cursor->maxW * 2 / 8; + offset = cursor->max_w * 2 / 8; data = 0; pstart = cursor->vstart; @@ -147,7 +147,7 @@ void sm750_hw_cursor_setData2(struct lynx_cursor *cursor, u16 rop, count = pitch * cursor->h; /* in byte */ - offset = cursor->maxW * 2 / 8; + offset = cursor->max_w * 2 / 8; data = 0; pstart = cursor->vstart;