Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1686005ybz; Thu, 16 Apr 2020 13:40:58 -0700 (PDT) X-Google-Smtp-Source: APiQypLa4J94fNu9Jynm5XexN8URCefeDcyoc3jO/Npr3PAcDzIfwLLPVOB+84LhPkbdeJQtffVP X-Received: by 2002:aa7:cc03:: with SMTP id q3mr36446edt.131.1587069658227; Thu, 16 Apr 2020 13:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587069658; cv=none; d=google.com; s=arc-20160816; b=Hnqn0nmIBMYKf1S2bu4q/AE5ipwebfavEKS1rp5Uu20qNU5j5wZlh8dGxN9YXySfGz XfAiQKxvnD9beuJEPwqGIKOpDkw2QbhtwuXijRCfe8I7FYOOlXWB6CB+5HsBT/+UEYlz b2OUt7aE0dMZPbDk78hxYWrark1tUIiqATgfRBZZe4WHMUeYJ/Chy2JnFJAi6irsNKN0 KRLsg2K+BPhpphujgrz7Vz5tp1ddFf465thKVJkZMwQ1HZfCpIwehkgCjxjNqeubi8OA zbdcRG1jQ8gcp8uooL9Oiq47OqdXh8DsP+hQFRU1Q9KXKxl2byrdBO8KxJimMVLfO8ZZ 6v8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=APUlN2SyohYE3TMZoo4vmSwQg+0t4tO+0TGNZ3bBlE0=; b=MF67aKQCZ/V5rc74BwkKQL6he2GSc/r0xvr3uouja+FvZOd2SaLdVKU6AcIjitgBdD BBeX+KvXjjwQNAT+YQCMyKPl0s6MiQOCPgVxYbYnEUkEUBfyVarknFYKJDkx9fhz2ct8 qRMdu1Gbe15mdZfuvaZY6ZRHTcaMM/6ptIvYih2Ad1aL7QSyPqROUZZWnVm2yiA15P4O svirYbn3J2qqvp5HVYAxWNXiwaCWQsZ7KSmGZHmJkbZj3zmjdm0Xw2CLbwYZtx0TQwtG I4GOO9pvfpSXqBvLTWnWP4vxJC911RXFyeYr9+jK7a+/9Y2fY8mxNoqEC7m/lJcHRE/L MF5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n1UvzusN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si9383556ejs.153.2020.04.16.13.40.34; Thu, 16 Apr 2020 13:40:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n1UvzusN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729657AbgDPQwM (ORCPT + 99 others); Thu, 16 Apr 2020 12:52:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728621AbgDPQwJ (ORCPT ); Thu, 16 Apr 2020 12:52:09 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB3BAC061A0F for ; Thu, 16 Apr 2020 09:52:07 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id r17so6134542lff.2 for ; Thu, 16 Apr 2020 09:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=APUlN2SyohYE3TMZoo4vmSwQg+0t4tO+0TGNZ3bBlE0=; b=n1UvzusNO2Rcn2bDf0NRYBXquabq4c/tHd3wR8FlPjMf0sYf/Qq0kmozER1LNg0R1J qrsGcfC4HLWAVrxFA+PBk66Ge+L56/er9nJL9uxxBNTwdShYjTuS9kopK7Ej6czuRz7O vWEfA9c3VNBqRmtI9NWJfhU8+dsHt09PrNhw9MlDRCTQ8BBFLtD4kD4kpY6XPRJQVsgd lAf6UOorr4V5diQfeUJmCR01jHL6PtuMOwQrnI5MW4/hB5d86hnQ0PkIgf0Vt7/VL3c1 iq/QlChEsUzsEa7sRzyNZgXSIC2xjHWNU9QZ2IoDrxOM16mQPTm84LEa2uk8Y53g2RLf nQUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=APUlN2SyohYE3TMZoo4vmSwQg+0t4tO+0TGNZ3bBlE0=; b=Hlljk7kARcC5SMfIIWkd2N+HfQ4/xz5SPvxyefBd/XV7FxWsF1Mpmw5vrRMDSfSICO INRF4AMlMiHfb6Eny+Vx59emM3SdGpOFSKtJcIU6SAHHdp5gK5zfISWWpl/n2eo9Xuu/ Y2KsEAm038blWKRUiy2CiQ9rl57/Gy+snu56TyJ3rQIh9LfkebiPXDHOTYrTmzO9DE9S cfleSvT3gM0gkE1n4/EbY8bVOH7W/u+19p2GJzrPvuDcfwvrTzpRjaR+LM/Xu6q2LEjZ yB0tpIvZyTjgelvPi+kHvb1V5i0ZWiAB+kQrbVVYAmzqSaoid1Zvz8u4vc0PGxvdgzIF mdBw== X-Gm-Message-State: AGi0PuZvKabBqLg5GI2gEJjz9c6Fu4WqF+r77HWAi3B64Jb2U1AtyOEL B7ZUDqEV5rYDknlX/6EITpLXj21nL2dbnSNg3TFdM/+5 X-Received: by 2002:a05:6512:685:: with SMTP id t5mr6408558lfe.47.1587055926080; Thu, 16 Apr 2020 09:52:06 -0700 (PDT) MIME-Version: 1.0 References: <20200414222713.32660-1-digetx@gmail.com> In-Reply-To: From: Linus Walleij Date: Thu, 16 Apr 2020 18:51:54 +0200 Message-ID: Subject: Re: [PATCH v1] iio: magnetometer: ak8974: Silence deferred-probe error To: Dmitry Osipenko Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio , "linux-kernel@vger.kernel.org" , Thierry Reding Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 16, 2020 at 4:45 PM Dmitry Osipenko wrote: > 16.04.2020 14:33, Linus Walleij =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > This misses some important aspects of dev_dbg(), notably this: > > > > #if defined(CONFIG_DYNAMIC_DEBUG) > > #define dev_dbg(dev, fmt, ...) = \ > > dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) > > #elif defined(DEBUG) > > #define dev_dbg(dev, fmt, ...) = \ > > dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__) > > #else > > #define dev_dbg(dev, fmt, ...) = \ > > ({ = \ > > if (0) = \ > > dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__= ); \ > > }) > > #endif > > > > If DEBUG is not defined the entire dev_dbg() message is enclodes in if = (0) > > and compiled out of the kernel, saving space. The above does not > > fulfil that. > > Hello Linus, > > After some recent discussions in regards to the EPROBE_DEFER handling, > Thierry Reding suggested the form which is used in my patch and we > started to use it recently in the Tegra DRM driver [1]. The reason is > that we don't want to miss any deferred-probe messages under any > circumstances, for example like in a case of a disabled DYNAMIC_DEBUG. I have a hard time to accept this reasoning. Who doesn't feel that way about their subsystem? If you don't want to miss the message under any circumstances then use dev_info(). Don't override the default behaviour of dev_dbg(). > The debug messages are usually disabled in a release-build and when not > a very experienced person hands you KMSG for diagnosing a problem, the > KMSG is pretty much useless if error is hidden silently. So use dev_info(). > By moving the message to a debug level, we reduce the noise in the KMSG > because usually people look for a bold-red error messages. Secondly, we > don't introduce an additional overhead to the kernel size since the same > text is reused for all error conditions. dev_info() is not supposed to be an error message, it is supposed to be information, so use that. Yours, Linus Walleij