Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp118820ybc; Mon, 11 Nov 2019 21:41:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwdBjsrehbIUHEaRxwBExZ1U2wHmrTRjDJNjqMtCR28vDZTFve+I2cRN06dCNY+RtMAyzL0 X-Received: by 2002:aa7:c694:: with SMTP id n20mr30777006edq.87.1573537272377; Mon, 11 Nov 2019 21:41:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573537272; cv=none; d=google.com; s=arc-20160816; b=P2aLZcERztImoUuuuBvi2IqY3+s/cpO8ioxwIPRnxthI9lXRRe7+6Wx+6xFkFfjlgt 2h5c+aabS00h4u4V0Li+6DHxVdIaTz0LIPdCUrDvHjWS6SIq7jVp1p2tpP/S7IW+qSf6 wj4quSJbwfKUidLPw2t1WyTU1DoGdWVejNObTNcw7wGGEzCUDCNSYnj9aIBbE5c8eNs+ PPUABR5vtLzLDy2ZXuxNYO0V8UdsfWFy67fgfSCfV/SIcodkY/aQUR0LDZZ9sYtpnrxj BDbkTngwfnN24IcK64TdZwn5lORqCjqDJU4GKQoDknFGsv9aGsSofU11zT7SCOFShY5G fwuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TKDYRxxdWUEMr2OMtj0shTSGcdPMavbcsIrB5bDpOu8=; b=w/JsLw4nyCvqTVmmRP57EYUzwSudd03ywOdnRQygreIbs85LYmhkDV/K4GBQNxkJMX 7hYtOJFchuTnskqFNXfNg61os3l2Z10NcdOhK09sxuEe1QgheGzShvThjnk5a8Trf4G1 skXbs1HhXzsvPC9Br6F70cDeATibk5Ip6Tk8ukmfIXhEiBjqZ0D7JsMeIw9pd9Iukf/Q yxWxX2nwGN+LywK+aC7tl66LeGUcP0txyPKMVBuUbspyzuVhS3Zbk2BgTDIHG1P/7nuE hbdoC3nwSAQ4sQWs0IIq2FHJEehFIyAUTpfFBfMXTUQZz/PLIwmxcyL21S4grOOQBGLA 3Tug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EIdklnhR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c23si11054048ejk.143.2019.11.11.21.40.47; Mon, 11 Nov 2019 21:41:12 -0800 (PST) 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=@kernel.org header.s=default header.b=EIdklnhR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725847AbfKLFkG (ORCPT + 99 others); Tue, 12 Nov 2019 00:40:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:34646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbfKLFkG (ORCPT ); Tue, 12 Nov 2019 00:40:06 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 817A02084F; Tue, 12 Nov 2019 05:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573537206; bh=DHULJ5PDA2aurBq/UHbqIfg+vBBq4iEHEwdqVLa0Rak=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EIdklnhR1wHAYbf9dcmZZxeSETsXhU1RQofV1TABiA/LMIwkDJkONzhxeGrMd9WEb 2YK+IKes8uDqeh0oeI+DUgPMeA3THWY3Hv/yBaurld+YtEEiCThT5vKHsWJbjw/kl4 aEkJL5Ymp45+COr4Cr2hcDGVlVHJoUbuiF33Zil0= Date: Tue, 12 Nov 2019 06:40:03 +0100 From: Greg Kroah-Hartman To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Blumenstingl , Neil Armstrong , Kevin Hilman Subject: Re: [PATCH] soc: amlogic: socinfo: Avoid soc_device_to_device() Message-ID: <20191112054003.GD1210104@kroah.com> References: <20191111221521.1587-1-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191111221521.1587-1-afaerber@suse.de> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 11, 2019 at 11:15:21PM +0100, Andreas F?rber wrote: > The helper soc_device_to_device() is considered deprecated. > For a driver __init function the predictable prefix text > "soc soc0:" from dev_info() does not add real value, so use > pr_info() to emit the info text without such prefix. > > While at it, normalize the casing of "detected" for GX. > > Cc: Greg Kroah-Hartman > Cc: Martin Blumenstingl > Cc: Neil Armstrong > Signed-off-by: Andreas F?rber > --- > drivers/soc/amlogic/meson-gx-socinfo.c | 4 +--- > drivers/soc/amlogic/meson-mx-socinfo.c | 4 ++-- > 2 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/soc/amlogic/meson-gx-socinfo.c b/drivers/soc/amlogic/meson-gx-socinfo.c > index 01fc0d20a70d..105b819bbd5f 100644 > --- a/drivers/soc/amlogic/meson-gx-socinfo.c > +++ b/drivers/soc/amlogic/meson-gx-socinfo.c > @@ -129,7 +129,6 @@ static int __init meson_gx_socinfo_init(void) > struct device_node *np; > struct regmap *regmap; > unsigned int socinfo; > - struct device *dev; > int ret; > > /* look up for chipid node */ > @@ -192,9 +191,8 @@ static int __init meson_gx_socinfo_init(void) > kfree(soc_dev_attr); > return PTR_ERR(soc_dev); > } > - dev = soc_device_to_device(soc_dev); > > - dev_info(dev, "Amlogic Meson %s Revision %x:%x (%x:%x) Detected\n", > + pr_info("Amlogic Meson %s Revision %x:%x (%x:%x) detected\n", This should message should just be removed entirely. > soc_dev_attr->soc_id, > socinfo_to_major(socinfo), > socinfo_to_minor(socinfo), > diff --git a/drivers/soc/amlogic/meson-mx-socinfo.c b/drivers/soc/amlogic/meson-mx-socinfo.c > index 78f0f1aeca57..7db2c94a7130 100644 > --- a/drivers/soc/amlogic/meson-mx-socinfo.c > +++ b/drivers/soc/amlogic/meson-mx-socinfo.c > @@ -167,8 +167,8 @@ static int __init meson_mx_socinfo_init(void) > return PTR_ERR(soc_dev); > } > > - dev_info(soc_device_to_device(soc_dev), "Amlogic %s %s detected\n", > - soc_dev_attr->soc_id, soc_dev_attr->revision); > + pr_info("Amlogic %s %s detected\n", > + soc_dev_attr->soc_id, soc_dev_attr->revision); Same here, no need to polute the kernel log for when all is going just fine. That's why we created "common" driver init helpers, to prevent the ability for this type of noise from even being able to be created at all. thanks, greg k-h