From patchwork Wed Oct 18 09:07:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dorcas Litunya X-Patchwork-Id: 13426706 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 915EFCDB47E for ; Wed, 18 Oct 2023 09:08:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbjJRJIl (ORCPT ); Wed, 18 Oct 2023 05:08:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjJRJIk (ORCPT ); Wed, 18 Oct 2023 05:08:40 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE7A493; Wed, 18 Oct 2023 02:08:38 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4083cd3917eso3160975e9.3; Wed, 18 Oct 2023 02:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697620117; x=1698224917; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FzwyhcJNZa6arJQKPZmLNcj0YJDSwAR/dJyY9R0VHn8=; b=TamCD6XMq2DDPU1wZxN8Ka/0Z5GNyRX0tZ5lu99EttXa1HtXFPJpBykPgaelj4ShEr zKGo9/v9VqNmu9A1GQWG2a9d4uuBH42r3RSn6sDLI3UEezXaqIdF9WXF1SfJXAKZ1ev0 yJiPSKsdfj3wQnGXzSFOMMNOJPXt6gGeWM4b9PWbEnvZbYyB5M+ei1QuSj5V8gEPuxZD BudfoXUIR0rm3w0cr1EftJo7OYnxKC8PEILPHHQG/6GoaVizmqBZraBSu8n1gH3hXYmx yU5nLgzMrJxxe78f4tcjw7YIqOaQdPpOeRFdTb8d4VPd4qqxtjGgnqno5ldrY1qanVmn rpXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697620117; x=1698224917; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FzwyhcJNZa6arJQKPZmLNcj0YJDSwAR/dJyY9R0VHn8=; b=GRSy+T+uTZi7NlDCXOqtPHor675NkdX9NYBGqLvTuzmw0Q+wLg6IVCTMIVudia13aC l4qmZ91tiSQgfVeP3bCDd2EY7X9JKLWoD1aK+2guLDEKDp0Wsldz5Qk32t8w+rlbgTB3 UrePA1b+3uESm/K7aRDK1zyzd8ug36wVJqxOslN71Yg55+zRVE/Wg7RVe7zrjnlYcaP5 trvytFJ1syoS17QeFUBz37a1QLFdZsVgH94JaGrpRp3FQE+ED9DKhiOn3aCKiGP9eSUp zzUmg1zHKtvVQaGIEGb5eLJPxpJTqpj89/e0HjpPn6Z/mi+wcsAhMjUK/QhGha0ViXVD JVsw== X-Gm-Message-State: AOJu0YzDHGS7ojUeaSYLkUWxQPvCDX7d0YsbtLX+6pRg08DgZXT5bfTK 8ac++AL3PGqit0o/329U8g== X-Google-Smtp-Source: AGHT+IE8Jb8g3iq2lM11tjT+znYj1cfMj3eJY/zNAnipfGZEi/tRU8f65xrzYMXswghDqHtMCAOCMA== X-Received: by 2002:a05:600c:444c:b0:401:b2c7:34a4 with SMTP id v12-20020a05600c444c00b00401b2c734a4mr3718752wmn.11.1697620116890; Wed, 18 Oct 2023 02:08:36 -0700 (PDT) Received: from dorcaslitunya-virtual-machine.localdomain ([105.163.0.227]) by smtp.gmail.com with ESMTPSA id l16-20020a7bc450000000b003fee6e170f9sm1107397wmi.45.2023.10.18.02.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 02:08:36 -0700 (PDT) From: Dorcas AnonoLitunya Cc: anonolitunya@gmail.com, outreachy@lists.linux.dev, julia.lawall@inria.fr, dan.carpenter@linaro.org, andi.shyti@linux.intel.com, Greg Kroah-Hartman , Sudip Mukherjee , Teddy Wang , linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] staging: sm750fb: Remove unused return value in display_control_adjust_sm750le() Date: Wed, 18 Oct 2023 12:07:35 +0300 Message-ID: <3997a009dff211fe4865644ecfb77406328a6607.1697619623.git.anonolitunya@gmail.com> X-Mailer: git-send-email 2.42.0.345.gaab89be2eb In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Modifies the return type of display_control_adjust_sm750le() to void from unsigned long as the return value is being ignored in all subsequent function calls. This improves code readability and maintainability. Suggested-by: Greg Kroah-Hartman Signed-off-by: Dorcas AnonoLitunya --- drivers/staging/sm750fb/ddk750_mode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c index bcdd291d25c9..83ace6cc9583 100644 --- a/drivers/staging/sm750fb/ddk750_mode.c +++ b/drivers/staging/sm750fb/ddk750_mode.c @@ -13,7 +13,7 @@ * HW only supports 7 predefined pixel clocks, and clock select is * in bit 29:27 of Display Control register. */ -static unsigned long +static void display_control_adjust_sm750le(struct mode_parameter *mode_param, unsigned long disp_control) { @@ -70,8 +70,6 @@ display_control_adjust_sm750le(struct mode_parameter *mode_param, disp_control |= DISPLAY_CTRL_CLOCK_PHASE; poke32(CRT_DISPLAY_CTRL, disp_control); - - return disp_control; } /* only timing related registers will be programed */ From patchwork Wed Oct 18 09:07:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dorcas Litunya X-Patchwork-Id: 13426707 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 262C1CDB47E for ; Wed, 18 Oct 2023 09:09:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbjJRJJM (ORCPT ); Wed, 18 Oct 2023 05:09:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbjJRJJK (ORCPT ); Wed, 18 Oct 2023 05:09:10 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B87E1F7; Wed, 18 Oct 2023 02:09:08 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-507a98517f3so4434977e87.0; Wed, 18 Oct 2023 02:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697620147; x=1698224947; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cpBTf7lcPPrlh5uO65BHtYFE8Nvp9es/xrzqlK/axIY=; b=I2qh96WnhJmHG0mwDEv3ZBOW7fgGTz9s2cEEPokSpGG1pdit+CxFgup+PsBLnC+T2p ol4Uhod7uOxcaa25JtM/zNgixth6ACescso7dfFjwIJE/qzH+gNwjqqSkedjqZAnn9SY B4smPH1d/pnaxVwY1Wr+ht8j7fS7qLI82Y7lzFIRGybn2sJpeSbDNfqxCKJEFBncmj1i ZTJKAffUFVD2boWwzcHKTIKdlLEUpJQhgNZiCDeCoYCGVfWoVZHzXtY2165sTIejVk7a /ksTyvu5+AocbN1SEdLmek3E29otz7h0qQE16NW6pdLBFP2Plz2pspl6kZ/fLUmHNnY0 7K4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697620147; x=1698224947; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cpBTf7lcPPrlh5uO65BHtYFE8Nvp9es/xrzqlK/axIY=; b=P81Ws9UgnohQXorB+8C/L7N64ed2XIpJovzsEwRh7DeINAm5dJh7nVodwNj8XGgXp7 wWBoSLCS1oyXBkSmInLlLvgYBaFyxufDitZ9quEIcvbLBQc043ZM5//EuJJ/HK/HQ7sF nhSyNvjoYXi3WySxbyOQzWK0ll6PIdNxX6FI7GhaBqVsYb06PP8MLM4nwJA133RkD+DQ zeK6iXXxRGq2KCCc6c3xLALMdIQH1QnYnOzm7YmqcKzg03gkyF+aoRgZKgTszWbleDD7 hNC5NAeF31g3huYj5PKi89xHgopy0qfVBdD9Cojjv8ITIyJUD/WAjHPKrZbxT9xKSNFH eVJw== X-Gm-Message-State: AOJu0YyVNwTIbcBCl9gFsLySqzU/I5+Rqs4gs0pWt5tpaG7US34G7/F5 FsAm2NcWRxVIsi1OzfJBezKP4LfQF73I1E4= X-Google-Smtp-Source: AGHT+IHexUEVIYWZg4NVhT/6ayuobviO0J5bcJdeY/hfx49NbfI55SMtkLr/hRDsat5UuOjQuWlF5w== X-Received: by 2002:ac2:5939:0:b0:500:9dd4:2969 with SMTP id v25-20020ac25939000000b005009dd42969mr3415814lfi.59.1697620146853; Wed, 18 Oct 2023 02:09:06 -0700 (PDT) Received: from dorcaslitunya-virtual-machine.localdomain ([105.163.0.227]) by smtp.gmail.com with ESMTPSA id l16-20020a7bc450000000b003fee6e170f9sm1107397wmi.45.2023.10.18.02.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 02:09:06 -0700 (PDT) From: Dorcas AnonoLitunya Cc: anonolitunya@gmail.com, outreachy@lists.linux.dev, julia.lawall@inria.fr, dan.carpenter@linaro.org, andi.shyti@linux.intel.com, Greg Kroah-Hartman , Sudip Mukherjee , Teddy Wang , linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] staging: sm750fb: Remove unused return value in program_mode_registers() Date: Wed, 18 Oct 2023 12:07:38 +0300 Message-ID: <492e63bbc58147fb534930ef9e1fb5d844ae8769.1697619623.git.anonolitunya@gmail.com> X-Mailer: git-send-email 2.42.0.345.gaab89be2eb In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Modifies the return type of program_mode_registers() to void from int as the return value is being ignored in all subsequent function calls. This improves code readability and maintainability. Suggested-by: Greg Kroah-Hartman Signed-off-by: Dorcas AnonoLitunya --- drivers/staging/sm750fb/ddk750_mode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c index 83ace6cc9583..e15039238232 100644 --- a/drivers/staging/sm750fb/ddk750_mode.c +++ b/drivers/staging/sm750fb/ddk750_mode.c @@ -73,8 +73,8 @@ display_control_adjust_sm750le(struct mode_parameter *mode_param, } /* only timing related registers will be programed */ -static int program_mode_registers(struct mode_parameter *mode_param, - struct pll_value *pll) +static void program_mode_registers(struct mode_parameter *mode_param, + struct pll_value *pll) { int ret = 0; int cnt = 0; @@ -202,7 +202,6 @@ static int program_mode_registers(struct mode_parameter *mode_param, } else { ret = -1; } - return ret; } int ddk750_set_mode_timing(struct mode_parameter *parm, enum clock_type clock)