Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp423063lqd; Wed, 24 Apr 2024 06:38:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWxXZ5OOjkwyYhZSl1uZfuGE8S++2937c+P3Q+ssY+O3QTYGBHwFgd5BHuIGSC6PaFzby1PMvSX5/qxUlaGbGeqtfo/wTWVHQ/WwVPS7A== X-Google-Smtp-Source: AGHT+IH36QYADAzqIx0tWva1C6+EAEalBlDRHf0JFLDJ1d1v88sBqHwgVXbFs0VsINK5Ln4MXD1z X-Received: by 2002:a05:6122:21a6:b0:4c8:e5a0:4222 with SMTP id j38-20020a05612221a600b004c8e5a04222mr2615858vkd.12.1713965937390; Wed, 24 Apr 2024 06:38:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713965937; cv=pass; d=google.com; s=arc-20160816; b=igT1D7DoMf7DFtV8uip7AaFBxXI4mtZ7NAOEtIeCvDUqRbSPgppo/NQv9maCvGeq+L CPtvGgBxu8w+xXGbjLLo9QBUub3Ke6jztTp0rDe/IBP3svr3hJFEVF5ckXIdzsWxqIry lEaw7/970nOtSakVjCBwh8SMVk5ZJRpx5S9kdD4vGDXAESj0kEN+ggT7lmAqjL0AinNs YteAUw4+GGwDS5eQ1Qb1b+ZbTOjS9+T/10jzX6VV+r9+ugqnL5WzvWkRo2moG+JG4/gO 8d80Mm/4gEO6An7qETZGK2/IwgZuL+ohbTMAkd7Mv0hoEQwX7e7MiMfdQyvpwvFKM4p0 dRUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=CJqJH6Aem+/Zgl9mTPvkSpY22mVAhX57+bi5i0Gt8yo=; fh=q+OxTlnQ1YlHIMMs8NfAJfAGIFZk1Pi0F8iLh/irSPM=; b=lAYkdrnLwX6gmp6LgO6ZDZoOis3rJ3Il5818P0Jw1onlG9b/4W/O+ys7ptCcs3wvH/ HDWJXMuOpb82CjXwp6J4LlOumrH0h9wN6/819P0WYr3b3CLD8nkG8rmkIoHS8u61oLTM FmfSr3VH3zo8v19GyzEpz1ehS49SQ+YiywEbU3VBqD3/eeMFpValqpPoI34N9CQa8MpP nmw/lJZrv8btu574Jj3Yc1FhS8Wq3MNRv4A1/E3fIyZNO0PWBcFdvm9fJ03G6aG7Eskk ZVIT9RFvvvAIvQPQlQsMZcYubqR3Jki3JdC9rkUv4ohw79/DKHqllvxlgxJZlEZv3HtZ Pk1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=FTfSJxOo; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-156984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156984-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w126-20020a1fc684000000b004dcb15ec271si2243904vkf.30.2024.04.24.06.38.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 06:38:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=FTfSJxOo; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-156984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156984-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1A7341C210F1 for ; Wed, 24 Apr 2024 13:38:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1371316D4CC; Wed, 24 Apr 2024 13:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="FTfSJxOo" Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B360516C877; Wed, 24 Apr 2024 13:34:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.89.224.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713965655; cv=none; b=HKz71ZWTu8rNP9A4jEC7WeAQVtEDdiouXyAhowWQ5MIZ501tzfLWE4zzo1L5014h35P8zxw9szTItGS7NVGTWZ3dY95xnUGVgQHRGqVy+V5DlpLbllVzQPCxJIMi90I3iGg17xmOiXCcv0CLwPvFUcJu9W+MPcA1N4ewHlFgLfM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713965655; c=relaxed/simple; bh=jTzIvhyASSHk9acPHHJTIVwyf1QGC20upSC7xQPpy2A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=f9u+WDBZRtP4tr75S93zXufKQj973VAptWvtHcOoPjnzxKVeDRdUQmsVQHm5l2oUMM9oZDRWiWcm4TdJ85tks85Nsv0BrKAlYAwxCDA/O2ezOl75xOvh5wGwDe57xFmNkcu3lbiPv+DwQDUaeGXDRjb9VsG6HqIygTh5qpPpoLc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=salutedevices.com; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=FTfSJxOo; arc=none smtp.client-ip=45.89.224.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=salutedevices.com Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id C7A4B120015; Wed, 24 Apr 2024 16:24:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru C7A4B120015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1713965056; bh=CJqJH6Aem+/Zgl9mTPvkSpY22mVAhX57+bi5i0Gt8yo=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=FTfSJxOoLiB1ltBzGDF2jq0P38lxy7g/qI0iDbTIisQo1R7GODF8Tj59opkiKAlJX eLS/ziL3Qu5cNc5Rt6gYAnmuyKEuYeLA5GPnGny32Pa31uMj8WMNTDshUV219fKcvl vCx2Ft7HDOJ+NoYxILPa60a86aAB+aivhDh31VSTZWLBiu8gyNuL/ELyDA5gm82P2Y oxjCuS6/205wwxr1ovZHDAuyx2miBaUwTAIXhxiVBVo/Af/zuvdXcoWDM1Xs6b50Oe vEKgt1YqwoPF8Mbw6EwYib7BWxdQJokDL4IDqNKcwH2cvi/ilS1AUvkRPyrl3w7KMs lUan7Mr/4Gs8w== Received: from smtp.sberdevices.ru (p-i-exch-sc-m02.sberdevices.ru [172.16.192.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Wed, 24 Apr 2024 16:24:16 +0300 (MSK) Received: from work.sberdevices.ru (100.64.160.123) by p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 24 Apr 2024 16:24:16 +0300 From: George Stark To: , , , , , , CC: , , , , , George Stark , Dmitry Rokosov Subject: [PATCH v2 1/2] pwm: meson: Drop unneeded check in .get_state() Date: Wed, 24 Apr 2024 16:24:07 +0300 Message-ID: <20240424132408.2565916-2-gnstark@salutedevices.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240424132408.2565916-1-gnstark@salutedevices.com> References: <20240424132408.2565916-1-gnstark@salutedevices.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) To p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 184897 [Apr 24 2024] X-KSMG-AntiSpam-Version: 6.1.0.4 X-KSMG-AntiSpam-Envelope-From: gnstark@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 18 0.3.18 b9d6ada76958f07c6a68617a7ac8df800bc4166c, {Tracking_from_domain_doesnt_match_to}, salutedevices.com:7.1.1;100.64.160.123:7.1.2;smtp.sberdevices.ru:5.0.1,7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/04/24 08:29:00 #24954596 X-KSMG-AntiVirus-Status: Clean, skipped Drop checking state argument for NULL pointer in meson_pwm_get_state() due to it is called only from pwm core with always valid arguments. Signed-off-by: Dmitry Rokosov Signed-off-by: George Stark --- drivers/pwm/pwm-meson.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c index ea96c5973488..f4d70da621ec 100644 --- a/drivers/pwm/pwm-meson.c +++ b/drivers/pwm/pwm-meson.c @@ -311,9 +311,6 @@ static int meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, struct meson_pwm_channel *channel; u32 value; - if (!state) - return 0; - channel = &meson->channels[pwm->hwpwm]; channel_data = &meson_pwm_per_channel_data[pwm->hwpwm]; -- 2.25.1