From patchwork Sat Sep 9 06:36:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 721187 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 85CF2EEB580 for ; Sat, 9 Sep 2023 06:36:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233815AbjIIGgY (ORCPT ); Sat, 9 Sep 2023 02:36:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244870AbjIIGgX (ORCPT ); Sat, 9 Sep 2023 02:36:23 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88BBA1BD3; Fri, 8 Sep 2023 23:36:19 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5298e43bb67so5796556a12.1; Fri, 08 Sep 2023 23:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694241377; x=1694846177; 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=iki1B+UVY8QtKWRaiKUBi6caCXXzC+9RSfzALEjfpWg=; b=qQjULGVg7sG/LhdC9EHRZASfWrJCQMrbiK7LonFMMZaAeBn4DE9hKxifERey++fRmd Q65xY0Bhr4oTP2smv6wH0XNGdOwpZvsAQWXwI58DGXkdH0iEr5Mel1QWnRDJOC3gNcxi rmd9sozKO8oukWTM6W1yosFecZEPQxKL8lR5IsExuZn6zjqwFaSxRWYfXSdTqqiAMyiZ LpSHe4fnfcffU91TUlkn8oQHFN6aT5wDRPIL8eF0EnJ1rvy5x4Fp2DXBUCwjIK3Ai2S0 q8ABgI04R0D5Sm0sQkmpnnzcP1x0DgHDcr+zGGHNu2Ku7qhySOGNEnXBuImm0yrtClhS 1BMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694241377; x=1694846177; 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=iki1B+UVY8QtKWRaiKUBi6caCXXzC+9RSfzALEjfpWg=; b=GHT9nC6KHxlCF87ByFenj0ps8AkqO2yBIa84npEuaJxygNsVwUxBBkU4gOiBh321Z5 Xb9/jFZ1Ln/SUdH0NQn0kdEJfpaQfisr2CEKWY6uLEJpY+xOiLUNAT2WJrq+tPxz4qCE jP8ZMLGeFRZyfy2y8wrP4UN09xxD2oulGqLwZ4Y3InUWZ+Ugu+h9NuFg7xHl9Lje1KFO JyVDpcrF4j3pl143fHIFOHUnZA/Y8ShQswq35N9vADk4It6iGjjYvZiI4igAfF7bywMa /2IUIDT7a+9/tXGcV00udvKJnkSCkths4K/3FEcZt8ZY5Yn8srtw00OSVyWhu12NalnZ jzLQ== X-Gm-Message-State: AOJu0YzSmZq51UrxFFU7tlplTBE7PNnnWsJHKWczO5IO54WNMR3du/Ht 8fhL9iot7khQ+qDoRb4yYYwddJ8qWZrnRA== X-Google-Smtp-Source: AGHT+IH56wl7tfjV0QivCeTVZmUk0hnENTgwi9AMRXH6MYjpOvcwkeKM4shOdI9gRtSbg623OvDPWg== X-Received: by 2002:aa7:ce0e:0:b0:522:2add:5841 with SMTP id d14-20020aa7ce0e000000b005222add5841mr5676078edv.7.1694241377279; Fri, 08 Sep 2023 23:36:17 -0700 (PDT) Received: from localhost.localdomain (82-149-12-148.dynamic.telemach.net. [82.149.12.148]) by smtp.gmail.com with ESMTPSA id z26-20020aa7cf9a000000b005232c051605sm1817525edx.19.2023.09.08.23.36.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Sep 2023 23:36:16 -0700 (PDT) From: Jernej Skrabec To: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 1/2] pinctrl: pinmux: Remove duplicate error message in pin_request() Date: Sat, 9 Sep 2023 08:36:12 +0200 Message-ID: <20230909063613.2867-2-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230909063613.2867-1-jernej.skrabec@gmail.com> References: <20230909063613.2867-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Detailed error message is already printed at the end of the function, so drop redundant one a few lines earlier. Signed-off-by: Jernej Skrabec --- drivers/pinctrl/pinmux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 2a180a5d64a4..301fe0157b02 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -173,10 +173,8 @@ static int pin_request(struct pinctrl_dev *pctldev, else status = 0; - if (status) { - dev_err(pctldev->dev, "request() failed for pin %d\n", pin); + if (status) module_put(pctldev->owner); - } out_free_pin: if (status) { From patchwork Sat Sep 9 06:36:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 721941 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 95039EEB564 for ; Sat, 9 Sep 2023 06:36:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245162AbjIIGgZ (ORCPT ); Sat, 9 Sep 2023 02:36:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244997AbjIIGgY (ORCPT ); Sat, 9 Sep 2023 02:36:24 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23F451BC1; Fri, 8 Sep 2023 23:36:20 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50078e52537so4646083e87.1; Fri, 08 Sep 2023 23:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694241378; x=1694846178; 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=TKJx+LKqmWSduMS/Rvqr7LYuPIf+jkXHy5f3h87Azkw=; b=H4Ox8u8yy9ABsxk16CKHLjNoDwe55IDziBqaIIcgYQ/u4q3Xtu2SWfI2mIooXz2Vml oqIVueK9KCJg0sQXDBMy3YODP8RsMNJetkuNmVZ9WI998COf9+kIT3FW2V8bWlpyPKyH tyfTv+Dj+4XYLW41mQ8H28ZuoedzxruQpF2k1hOUmPjWvWJW7TBz5Vkx+Pp/nYX6bZFf pjxGK9L2o3BGBAxBYmoTiuJsjqscZZzXnX2XdW2doRO8FULCevl5d+AsBuQpOad5Mvut YHHMGk00ncR/9yN8dXFnL6sxjnGNkVGiUAUCMMfIZHgQyR0KwRoj03otFEtxfgjN8CEL k4Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694241378; x=1694846178; 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=TKJx+LKqmWSduMS/Rvqr7LYuPIf+jkXHy5f3h87Azkw=; b=g512C0WA9dmh1JTiIKARnsPpIq1Pv2FbZ7JMqgJx+i4N1Dcns5GZ6JigjURRkBZSfe 6PdXuMesMr2VPSLxElvurv2r6Ce2YyzgMA3fKSxD9ZAhigCUbmWanlWPLWNF363rXuY6 IoAUEZsypQt0hW9SmVrjqMSpjTURunUY5Pd0KT7W/oZ8rMtP3zAY8qeqkKh6dXffmWQq Eay/HJvQLtYfAQ1fdUPa7Wr5hSIlQBO/RCJtDN+K5o0phfAD0zz/8m427ZGUnetZLYPc fjUy9FCNTzSpNtlxQyBP7Jdyi0YFvTQXc66si8KlAqvWS/bLiXnUfpO38JbAxdAZ0w/l oJtA== X-Gm-Message-State: AOJu0YyOcCEHKMUWRbOMrFgLHXAqERHqPfKKLkBRrv7wmIh1mQT7/d3a 9xjB9/sTVysFpzlCEYpDvT4= X-Google-Smtp-Source: AGHT+IErHcq9ubq4i/fLo8BpmE3piWI6lH/Iz6S/+VWsWigOE7ElgCdtELO6Ynn+weWfTOET4g2wNA== X-Received: by 2002:a05:6512:688:b0:500:9b7d:ee22 with SMTP id t8-20020a056512068800b005009b7dee22mr4318820lfe.60.1694241378054; Fri, 08 Sep 2023 23:36:18 -0700 (PDT) Received: from localhost.localdomain (82-149-12-148.dynamic.telemach.net. [82.149.12.148]) by smtp.gmail.com with ESMTPSA id z26-20020aa7cf9a000000b005232c051605sm1817525edx.19.2023.09.08.23.36.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Sep 2023 23:36:17 -0700 (PDT) From: Jernej Skrabec To: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 2/2] pinctrl: pinmux: Use dev_err_probe() in pin_request() Date: Sat, 9 Sep 2023 08:36:13 +0200 Message-ID: <20230909063613.2867-3-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230909063613.2867-1-jernej.skrabec@gmail.com> References: <20230909063613.2867-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Use dev_err_probe() when printing error message in pin_request() since it may fail with -EPROBE_DEFER. Signed-off-by: Jernej Skrabec --- drivers/pinctrl/pinmux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 301fe0157b02..4a9776a99d20 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -188,8 +188,8 @@ static int pin_request(struct pinctrl_dev *pctldev, } out: if (status) - dev_err(pctldev->dev, "pin-%d (%s) status %d\n", - pin, owner, status); + dev_err_probe(pctldev->dev, "pin-%d (%s) status %d\n", + pin, owner, status); return status; }