Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp3787854ooa; Mon, 13 Aug 2018 18:31:12 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz8HQXWJgXVE3WiKq9o6owuZxdaLQdfE3mlZAdERxp7DZYxQEfZQ6n6kEv0SX0fHM/IxFLd X-Received: by 2002:a62:3184:: with SMTP id x126-v6mr21379861pfx.49.1534210272912; Mon, 13 Aug 2018 18:31:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534210272; cv=none; d=google.com; s=arc-20160816; b=Ld33of+Lgegk0AwhxUEPMyEC9AiAb8smDBYZqZdNzuErygjos1kyD2tbEm05p84T3M NdJ++WqxZdWy7M12cjivgdyRRmW5yK7qABkuD3AllFiPjdf5ccyeF2H6LhytkGE3WQGw GOAhEAlGvL3jEUw3YUvK5NGQIKqJr/aVZ9QDhxLrFeEMu8iO+H8v5sjHPZOqsJ7St9UF l8Iacc/eLNymc5ADb1aDS9sDOUyA7tkvUBdd5I9gTAlCA/xDZz2YoQQN11C2LVMlwsBS TAKlPUb6ybTbDWocYTupWCPMeoEPbHx2LJh5gtaUXDXrTcyb+qRnGoDtyTnFWIa0/bLH uQtw== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=WTUorP6SoYqOfkk0C+I3UmwXrjQzP47Qt5ZFiN8mVLg=; b=Ug6SB2Q31p2gpp4Si5tqQh0oRWlJ3SLpuCYUrse268pw2L3G7jKeh2u9crgXDAIazn lUSEkfNpaDpIbA5CdgPWVYfzLxyeFprHywNUplyYqb+RtSoYpG2xNolBe35e8f0loY// ubfN2mvToUvh1ulupDlCBXc7Hi4iFOrWd5lsMMEEjjMNzeQXIB8T65SH5edr/wCqCoIS 0O+O0zkkvgEfboaSAhHavVbe6brVmU9VdzssZerYGd670bqH1n1xct5WvbS24OKTU+W9 lG/r97bdIdfep3/IUgqR7+ZZT+VVlj5rsnzqDAbwcDXvV1Qd8oY6TY8dNKedgDf9YUiC ZUBg== ARC-Authentication-Results: i=1; mx.google.com; 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 x23-v6si20663805pgj.543.2018.08.13.18.30.57; Mon, 13 Aug 2018 18:31:12 -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; 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 S1726034AbeHNEO4 (ORCPT + 99 others); Tue, 14 Aug 2018 00:14:56 -0400 Received: from smtprelay0202.hostedemail.com ([216.40.44.202]:42177 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725778AbeHNEOz (ORCPT ); Tue, 14 Aug 2018 00:14:55 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id C1B21180A844B; Tue, 14 Aug 2018 01:30:06 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:800:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:4321:5007:6691:10004:10400:10848:11026:11473:11658:11914:12043:12438:12740:12760:12895:13069:13311:13357:13439:14181:14659:14721:14819:21080:21451:21611:21627:30003:30029:30046:30054:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:32,LUA_SUMMARY:none X-HE-Tag: twist79_1df67b9bb1959 X-Filterd-Recvd-Size: 2353 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA; Tue, 14 Aug 2018 01:30:05 +0000 (UTC) Message-ID: <702abadd074f1aefc8d4566c4da72284a5dd3ec6.camel@perches.com> Subject: Re: [PATCH 8/9] platform: goldfish: pipe: Replace pr_ with dev_ for logging From: Joe Perches To: rkir@google.com, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, tkjos@google.com Date: Mon, 13 Aug 2018 18:30:04 -0700 In-Reply-To: <20180813233839.190855-8-rkir@google.com> References: <20180813233839.190855-1-rkir@google.com> <20180813233839.190855-8-rkir@google.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-08-13 at 16:38 -0700, rkir@google.com wrote: > dev_ is preferred if struct device is available. [] > diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c [] > @@ -384,6 +384,7 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, > int count = 0, ret = -EINVAL; > unsigned long address, address_end, last_page; > unsigned int last_page_size; > + struct device *pdev_dev; > > /* If the emulator already closed the pipe, no need to go further */ > if (unlikely(test_bit(BIT_CLOSED_ON_HOST, &pipe->flags))) > @@ -401,6 +402,8 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, > last_page = (address_end - 1) & PAGE_MASK; > last_page_size = ((address_end - 1) & ~PAGE_MASK) + 1; > > + pdev_dev = pipe->dev->pdev_dev; > + > while (address < address_end) { > s32 consumed_size; > int status; > @@ -433,7 +436,8 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, > * err. > */ > if (status != PIPE_ERROR_AGAIN) > - pr_info_ratelimited("goldfish_pipe: backend error %d on %s\n", > + dev_err_ratelimited(pdev_dev, > + "goldfish_pipe: backend error %d on %s\n", > status, is_write ? "write" : "read"); > break; > } Wouldn't it be simpler to use pipe->dev->pdev_dev here instead of creating and assigning a probably unused use-once pointer? What does the output look like now? Is the "pipe->dev->pdev_dev->name" then "goldfish_pipe: " output useful?