Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp312479rdb; Thu, 25 Jan 2024 16:53:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbIR+aZbQeSWG9kezWxJBwgFGlgM7uoZ5DUrb1cfrb8uYbDgyzcBNL6U0GUZ4bWYOvJ90k X-Received: by 2002:a17:906:c297:b0:a31:c1fe:bb3d with SMTP id r23-20020a170906c29700b00a31c1febb3dmr224790ejz.119.1706230430162; Thu, 25 Jan 2024 16:53:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706230430; cv=pass; d=google.com; s=arc-20160816; b=lB3LX/Dz0abZffUzDhWATajEFhyulGXtM4LpxwNRzbUfPwKsCbjB0J0647StBKI04X 5upDHdV6kTC3gvD4hClXqdxKn54kbW/RPguU9nc+hcZln8igl6b6cJTC+EUrV9Pz/TdA lZXjzOudcOyz5tzA65M/zqLOGRkExph4Hc1bKoc1EEQJs1D7XEulLPE3fEakjQ5REq2C XziEwKUyqPqriCGqokYw3FtNg32JITziQQz7GnyCZDjZESmjdHIVqr+CWudGia+kgJfB lhHKDT/EmcUwsh4439Y+3H2w99if+ntXQ2lhGAsB8we0DIKaadoNBBuCXkHv48LuCvWU xnIw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=aYpbwXcXYiJ6roKOkYLJmrvPmRofsX5FO7Hr83jUdbQ=; fh=TsC8QIsNLVPST2oZ0dSYe0YZ4Onwmcs1ONrlV8srVzE=; b=Y4DB9ji/c/v8QYJUjBFTtUG4uut0E7a6QIDdjVwW2D7dU7NJsm4wqcAY4vUNIbkoip ZQhy8BVsNqAPWjLZwftiTAPY5Fokd2kuYynK54NKL/lRE4wAFqTZfuDNtzz9xXfEocUn A6JjMZrdqEfkNbfMBB+AUdFT4dP1BebpIQZ5pBlCjXE0DTZliiAoFYBY3pJmKsFdEdkT WAvm2Z/qAhMEG08HQfAnXz0fvH9hKyROUjDKPLdsIOXRdsmuswHFR43TJnaYce1Bt6/o eOevdDXUaNJqfFerQGGoH8GzYZ+tuE6RHTa7xZYZPnc4CcJ6M41zBlSbBto5OQMS9AnC oZrw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fv9cm1tR; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-39475-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39475-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q25-20020a1709060e5900b00a2dd05df9d5si18840eji.437.2024.01.25.16.53.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 16:53:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39475-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fv9cm1tR; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-39475-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39475-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id E57861F25C6C for ; Fri, 26 Jan 2024 00:53:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B04B9EBE; Fri, 26 Jan 2024 00:53:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="fv9cm1tR" Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) (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 6AD271C11 for ; Fri, 26 Jan 2024 00:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706230423; cv=none; b=bBrwCH9Jq55H5SHIF7OEFJOV36PK9SLEIqTfZL4ZmkwojICWDHT3itiFac4bX5LoVsG8nPBk2p9c1Cy9+T4JRHvyw+woBOBi8OE1N0E74YU7snRyB+KrDvlEMmkdUuYM3b074S/wi9h9iJwLB4gNli1rtZe5RnRWzhkn1kmwCFo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706230423; c=relaxed/simple; bh=QuxxZaE5L8GrPM+q3t1r7YN+Zo56XqoDR/6PrJaKyeI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gBPhJSHFQ6NQOEY5yyS6P0OvAny1TC1yexrmlwh/ySkHJ6Uneg7QyEfJSr05+eDAgTmHNmWkYfVFr0TJS5/StD+GDxCn97K9+hQjEvBrNX6+JtYNErCFj1NSvZzO735Mu+AqCnAFplc7OwAupEgsBH7as1H3KGkVCs+aesa9DF4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=fv9cm1tR; arc=none smtp.client-ip=209.85.160.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-214de82b6ddso335234fac.3 for ; Thu, 25 Jan 2024 16:53:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706230421; x=1706835221; 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=aYpbwXcXYiJ6roKOkYLJmrvPmRofsX5FO7Hr83jUdbQ=; b=fv9cm1tRuj04y4OsZoCeKlWR6Mr1nSrUOYCB2ZdSdW8fOmODGKMgl9WaOmORNmISGD 8HFLUbvzCIa1iL70GOrmS+6Ijp4vT8vFxGccWyELewdEyYjY6YMlLcP5XkDpTDz8YEIx 001HzGxu/pUf9Gokg4PxwfnJPrI18i+WfCbzE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706230421; x=1706835221; 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=aYpbwXcXYiJ6roKOkYLJmrvPmRofsX5FO7Hr83jUdbQ=; b=bFSV252rb0nrlJUHoEvB13Nw7AgA/cz86euobe8eq9XK1fYA4XW/stmmlCwlyJr4tm HaFJwonw6x+wUKDi1rZhWwSvIfstIHxal5a52+b7HgX2kXG9/wPVMPd9fj+m8U/3Llyd qhl0M51n1fAgoiVl4kXHlrVvekXgiE2jw2gpwb5ZMXBVnqJEvX63t35O5LvGgxM99xiH dmGFTHi/qA+2acp7Er3+hZ2DypFoZElySXQc82K0zDo3EBSoMdly9yoG8kTC8G9zUMlL WhqdY/yNPE8IxT8kreFPBqhbDFuS4aItbOB8CWyEIYB8Mxr2DnkUpOmkfOcXfEwZR9kT t++Q== X-Gm-Message-State: AOJu0YzLvim/6RfZ8VesItbYqVn5M31hPb12ZS0KCzxSu2Mt1fvj941B oyu3IbW6qgtMEJsUPZr9RakKXoDBdLqqdbmcIHa6SBJ0/qOZnCX/rZSdvp7paQ== X-Received: by 2002:a05:6871:530b:b0:210:a7d4:44ef with SMTP id hx11-20020a056871530b00b00210a7d444efmr572248oac.110.1706230421521; Thu, 25 Jan 2024 16:53:41 -0800 (PST) Received: from localhost (209.148.168.34.bc.googleusercontent.com. [34.168.148.209]) by smtp.gmail.com with UTF8SMTPSA id o15-20020a63e34f000000b005c2420fb198sm123208pgj.37.2024.01.25.16.53.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 16:53:41 -0800 (PST) From: Abhishek Pandit-Subedi To: gregkh@linuxfoundation.org Cc: Abhishek Pandit-Subedi , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, workflows@vger.kernel.org Subject: [PATCH] coding-style: Add guidance to prefer dev_dbg Date: Thu, 25 Jan 2024 16:53:11 -0800 Message-ID: <20240125165311.1.I8d9c88e747e233917e527c7dad1feb8a18f070e2@changeid> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit During review, it was suggested that drivers only emit messages when something is wrong or it is a debug message. Document this as a formal recommendation. https://lore.kernel.org/linux-usb/2024012525-alienate-frown-916b@gregkh/ Signed-off-by: Abhishek Pandit-Subedi --- I'm sending up the change to documentation while this is still fresh. Will send an update to checkpatch.pl afterwards. Documentation/process/coding-style.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst index c48382c6b477..f8ec23fa89bc 100644 --- a/Documentation/process/coding-style.rst +++ b/Documentation/process/coding-style.rst @@ -899,7 +899,8 @@ which you should use to make sure messages are matched to the right device and driver, and are tagged with the right level: dev_err(), dev_warn(), dev_info(), and so forth. For messages that aren't associated with a particular device, defines pr_notice(), pr_info(), -pr_warn(), pr_err(), etc. +pr_warn(), pr_err(), etc. When drivers are working properly they are quiet, +so prefer to use dev_dbg/pr_debug unless something is wrong. Coming up with good debugging messages can be quite a challenge; and once you have them, they can be a huge help for remote troubleshooting. However -- 2.43.0.429.g432eaa2c6b-goog