Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1063834ybx; Fri, 1 Nov 2019 16:08:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxZxxqdK8DcKJBGO5mLu80QVNS1ZQfcfxe+pgZFuInBmvuQhjYIBR0GEWqrhO+JiXBVjvq X-Received: by 2002:a05:6402:1156:: with SMTP id g22mr15830041edw.233.1572649712706; Fri, 01 Nov 2019 16:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572649712; cv=none; d=google.com; s=arc-20160816; b=ZXegojdNcFC9/ic0x9/2toWZ9mt+MswsRN7TcRcXT8p7NxgoIumQgLn85al1osRUAu v3yVhZbD466qfQNfSinODpdP4ShovgcFU47+xuUcUwLV+p0zmUgUkMAvd52LCyJYlq8p PumJXu2AIb8CDeDZjlog470m0+HzAQUsq1463lQq6bQhcXpk7Rlvtulm7/T1jrdUYAzG McrsLC/1bjvmvERpaevgnJV/KQk/t6iWrmBUIqoyWcKzwLgDbbR9+CGabfNCwQJNhjYg vco4JkYu+q0Pak5TPDVWQ1Uj3NEZ7u4DdMHZskzaJsPvOzZr/1MNjkLR7AslZrTbOGV+ 9k9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bf69Nkr7XBkmTO1YD+9sNVV+WBGtzvC5rxPzFLKlWNo=; b=WJweU9soMqNKDCg09gK2fRI7xHferBt5L8IvCNSmZk8T7FpVMoRuQm5/fsdj9JNgjx JBij3Dk1c8btbbTcMtVKamKraPq3xaufE6WnNG/YkeHnt5gYhDp+8upeP4qHk441zrxr D18UTi9ON/0eanf1ghYrzNyojVsQ2T3FfhJnghyEN6hEtyG3U+bdFFZEb2S+vw9RTfZS DB/inWl90iSyDQB/JufKumdEVSHgths7+wm6BL6EECjNL/bAIpS0FGR0lrHb24HyttzQ vOUv9YFg5rG05Bd/RCVHo3PsE45qx4IFgtOjCX+d28Tw4wUj5jfW7i4nZ0xvBZyE4aik jSew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fef9ITir; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d15si6998801ejw.269.2019.11.01.16.08.09; Fri, 01 Nov 2019 16:08:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fef9ITir; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbfKAWxk (ORCPT + 99 others); Fri, 1 Nov 2019 18:53:40 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:44600 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727718AbfKAWxk (ORCPT ); Fri, 1 Nov 2019 18:53:40 -0400 Received: by mail-io1-f66.google.com with SMTP id w12so12513511iol.11 for ; Fri, 01 Nov 2019 15:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bf69Nkr7XBkmTO1YD+9sNVV+WBGtzvC5rxPzFLKlWNo=; b=fef9ITiroUgvdPL9dSereSDmc2uHGR7fnIsdwnXDmA0MFiLxHlMcWFQLIHWQVYz488 wepTmOx6B3NDyuQStyl0eD2Y0ifgeBrEdd4uyG48SyEac7cZmtepCiNECLJ5HIE9h1Ku nuK5ExP5bNiE27blrdbkdwG0Y7XVk8OxK0D1I= 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; bh=bf69Nkr7XBkmTO1YD+9sNVV+WBGtzvC5rxPzFLKlWNo=; b=P7jvD4Tvpukt3GfqfiGUDySKkuZSJIQdzVrXDX84WT36KvwvXOFTlA5bGDU9yVfy1G AvGLts6+r/QAwIpMZTNXCJoVAAmBG4RJ2UQ9u8eBjUb8dI5ApNmLcYPCbdCAfMQNYXlP u6X2uIakMi20ekAb4aQ6JCvgr2PU2chbvfJAR8qQWhU/l/moYT6ZixqIqZYn9S49scg2 GNoFvz5y6+/r8W3t7lOzg2VslHqk5njRlD3XRoZ4bkBdzx1aNaX/DdUggHafM3nk1vpg YICNvyhJWwZSMIyI4J2bwsRJiO+SGd1vzuz/hoKQhi6pgeSim3B0jS6zwD/ajdFBoUq5 lNNg== X-Gm-Message-State: APjAAAVQ1KNDQWEKXrJZqLm+Ez3mXeo7OEmXtsDqj74u5ZioSMP96QWl RPzJlg+F8x7237oeHgcedCvWixxer5A= X-Received: by 2002:a5d:9e58:: with SMTP id i24mr13407613ioi.255.1572648818983; Fri, 01 Nov 2019 15:53:38 -0700 (PDT) Received: from mail-il1-f182.google.com (mail-il1-f182.google.com. [209.85.166.182]) by smtp.gmail.com with ESMTPSA id k20sm512379ioc.70.2019.11.01.15.53.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Nov 2019 15:53:37 -0700 (PDT) Received: by mail-il1-f182.google.com with SMTP id t9so7715532ils.4 for ; Fri, 01 Nov 2019 15:53:37 -0700 (PDT) X-Received: by 2002:a92:d0a:: with SMTP id 10mr14227736iln.218.1572648817422; Fri, 01 Nov 2019 15:53:37 -0700 (PDT) MIME-Version: 1.0 References: <18717de35f31098d3ebc12564c2767b6d54d37d8.1572526427.git.amit.kucheria@linaro.org> In-Reply-To: <18717de35f31098d3ebc12564c2767b6d54d37d8.1572526427.git.amit.kucheria@linaro.org> From: Doug Anderson Date: Fri, 1 Nov 2019 15:53:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 03/15] drivers: thermal: tsens: Add __func__ identifier to debug statements To: Amit Kucheria Cc: LKML , linux-arm-msm , Bjorn Andersson , Eduardo Valentin , Andy Gross , masneyb@onstation.org, Stephen Boyd , julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui , Linux PM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Oct 31, 2019 at 11:38 AM Amit Kucheria wrote: > > Printing the function name when enabling debugging makes logs easier to > read. > > Signed-off-by: Amit Kucheria > Reviewed-by: Stephen Boyd > Reviewed-by: Daniel Lezcano > --- > drivers/thermal/qcom/tsens-common.c | 8 ++++---- > drivers/thermal/qcom/tsens.c | 6 +++--- > 2 files changed, 7 insertions(+), 7 deletions(-) Obviously my opinion doesn't trump maintainers ones, but I have always heard that this is the wrong thing to do for "dev_xxx" debug statements. Specifically: * For "dev_xxx" statements, the device name is already printed which is pretty good for getting you to the right driver. * Once you're in the right driver, error messages should be unique enough to find the right function. If having __func__ in all messages was beneficial then the "dev_xxx" macros would include it by default. They don't and such things just uglify the logs and chew up log space. I suppose you could try including a CONFIG option to add it to all "dev_xxx" functions and see if it would be accepted? Then you can turn it on locally. Using __func__ in cases where you don't happen to have a "struct device" (and can't get one easily) makes some sense, but otherwise I believe it should be kept out. -Doug