From nobody Thu Feb 12 21:47:11 2026 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E0576F06A for ; Sat, 4 Jan 2025 14:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736000406; cv=none; b=cMoQ1sGDnOfVy6TAH4RF6s1jFYiByY2y3NE2DWDKRQXmpyouk5D6h332niVPZLHTN2ZibI9qmuaAPY8kI+pTmYxmiftfLuRGD7NRcoXYnfyNunRljMeK4TWwB8FtIcQ3PImiF7mBAJ6b7QdJjgWDQ9NDOSOAMVP6MKUgX7VL4W4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736000406; c=relaxed/simple; bh=Yw9/qA6qdIyvvXun/xp/2uZfzd7ISgOLONvyhIpN+MQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ulg3hO689qDH5+n3mCP7WoYAcEqR/LzQvgfxKfQjQAFA+hj9eUZ2lguiovPXGOzXnEkKW1fiAhCJqm4W+1A1xz48BEs2iM7u/nk6k/Y12Q4mPHPclR0NXiAccZqGqcb3JOCidmVsMEtBH7JUyRXQ31ec1L1G7tZnb7x+i5YUOJk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=P8+apiS9; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="P8+apiS9" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-aa67bc91f88so140487766b.0 for ; Sat, 04 Jan 2025 06:20:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736000402; x=1736605202; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DEVdWJGp2oPicz47kN5r+WdNuLFnOSMb7vA6U1ddIq8=; b=P8+apiS9w6mVrTNOUXd8pbmk4550KxgMPGGYKm2Ztxg5aGURi8BLZQKlGFcFeHiQ2t VzXvdLnNTx8KFH6y/5UpNXX3aoLsG9OcWMQdS5nPZrDGR17cUyHy6+RSidydN3FFlln0 r1Mp4CUbBERN2+oZVeMD4/PfOel0e8zmYZiu6ZQ844zEGp/2tpTVb8vR3tNvLwRutEJW Yz30JW2zi5P8HW0X/Cu8qMnf6LoBHs1EKGOMR1VOK9N1lBOL0Q2YboKz9gu26CZ6iLNM rRLJHzA3zG63jjGuNAuO/WpqmzH2q9+6g8BE0BnBhttUXcn5Rq9xMVUhZX2MHRm72H0f Fn8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736000402; x=1736605202; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DEVdWJGp2oPicz47kN5r+WdNuLFnOSMb7vA6U1ddIq8=; b=aHgR6nJZPLQKLNHnPhhowHVP0mJA36V8RyOOq/8ErPRlfzLVplMKnVp97U0wFL+G74 k03LOdFOpO99clB7bKfVq6fyRXj09Oh5RU4DWICUYDuj+L7WYHY+nsWchXHH8q3aRYGj morI0wcteuvYsmeJ7ftTFq1IG64R8kDTYRvTHCdW4HuZ9j1qYYV7ZYbG2dfi/uZ/rBIS Ts/TzLpEv6ZbfygCrthIApQ/pgTch5UhJsSaOS/gwTDXzK8zeMuXyH9jMcRIKDtZahTG 1HATtLDs9kWIFohTDcQvDvqS+SlGIOefqjuXunY7Ioo2n/Oqc57Y7csQnqmkjzQl2NkS DZEg== X-Forwarded-Encrypted: i=1; AJvYcCUYvD4gBhdAG2yzy6gtfuyYSfd1k/3ievfevRLi/LUZQl0B5ISdoCshtgsQBAQt25IiyCj4Dz50cz2uQYE=@vger.kernel.org X-Gm-Message-State: AOJu0YzKW1tvDKaE7daeY69LP8asr8ifxoWh5Ezk3Iz2y069+JlJU8WP xbpNlFGHV/aj/cmriaUf5AFUZbP1ZhfThUZJwvRTw1KPIwsaCgfOKZz9B8s/XYk= X-Gm-Gg: ASbGncvo3v7ItYAOlWRRdjxUzib6HROJh4asxEj4bgJSryJX1Qim15FUPJqrhKSco5V HNlZG4IKJGeLTyvfOVwlhNtyGOcdCJsKUg6EZ15hFsKyAv0VXNzTZ3oQFwrLyMgE6WEVUZEn0Zd k7iInzJXd2sZZjN3GGCIqgbXpSIpjFitfr/K3kaRmnCPPjI/wxnOs7PV2aHRGL+DZaVjF95NzUb eGRqcnWz9mMM6aP28vdikz14oLNEuzooIyOH25H81FC0l2BiZvSkInWnZ5bXNLXRhn85zU= X-Google-Smtp-Source: AGHT+IF0kTNDNwhatI78ot8PP3F5T6/eUJ/qkL8c17ZKWJ39fQiecWvtN2mcb/zxpWtnZxXp/jPhww== X-Received: by 2002:a17:907:3e8f:b0:aa5:3e81:5aa2 with SMTP id a640c23a62f3a-aac2adc463dmr1726287666b.4.1736000402221; Sat, 04 Jan 2025 06:20:02 -0800 (PST) Received: from krzk-bin.. ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0f05ee5esm2018481866b.171.2025.01.04.06.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jan 2025 06:20:01 -0800 (PST) From: Krzysztof Kozlowski To: Thierry Reding , Jonathan Hunter , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH] soc: tegra: cbb: Drop unnecessary debugfs error handling Date: Sat, 4 Jan 2025 15:19:58 +0100 Message-ID: <20250104141958.115911-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kernel coding style expects all drivers to ignore debugfs errors. Partially because it is purely for debugging, not for important user interfaces. Simplify the code by dropping unnecessary probe failuring and error message on debugfs failures, which also fixes incorrect usage IS_ERR_OR_NULL() and Smatch warning: drivers/soc/tegra/cbb/tegra-cbb.c:80 tegra_cbb_err_debugfs_init() warn: p= assing zero to 'PTR_ERR' Signed-off-by: Krzysztof Kozlowski --- drivers/soc/tegra/cbb/tegra-cbb.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/drivers/soc/tegra/cbb/tegra-cbb.c b/drivers/soc/tegra/cbb/tegr= a-cbb.c index 84ab46c9d9f5..6215c6a84fbe 100644 --- a/drivers/soc/tegra/cbb/tegra-cbb.c +++ b/drivers/soc/tegra/cbb/tegra-cbb.c @@ -69,19 +69,12 @@ static int tegra_cbb_err_show(struct seq_file *file, vo= id *data) } DEFINE_SHOW_ATTRIBUTE(tegra_cbb_err); =20 -static int tegra_cbb_err_debugfs_init(struct tegra_cbb *cbb) +static void tegra_cbb_err_debugfs_init(struct tegra_cbb *cbb) { static struct dentry *root; =20 - if (!root) { + if (!root) root =3D debugfs_create_file("tegra_cbb_err", 0444, NULL, cbb, &tegra_cb= b_err_fops); - if (IS_ERR_OR_NULL(root)) { - pr_err("%s(): could not create debugfs node\n", __func__); - return PTR_ERR(root); - } - } - - return 0; } =20 void tegra_cbb_stall_enable(struct tegra_cbb *cbb) @@ -148,13 +141,8 @@ int tegra_cbb_register(struct tegra_cbb *cbb) { int ret; =20 - if (IS_ENABLED(CONFIG_DEBUG_FS)) { - ret =3D tegra_cbb_err_debugfs_init(cbb); - if (ret) { - dev_err(cbb->dev, "failed to create debugfs\n"); - return ret; - } - } + if (IS_ENABLED(CONFIG_DEBUG_FS)) + tegra_cbb_err_debugfs_init(cbb); =20 /* register interrupt handler for errors due to different initiators */ ret =3D cbb->ops->interrupt_enable(cbb); --=20 2.43.0