Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1308437imm; Tue, 3 Jul 2018 08:56:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIBYARB43Gy9QQRLCCmG8RciXerYXdjeAdJx3DIGhLCvdDCHdZys1Hraan9c4roEeQGY6dW X-Received: by 2002:a17:902:b18c:: with SMTP id s12-v6mr30623210plr.187.1530633407453; Tue, 03 Jul 2018 08:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530633407; cv=none; d=google.com; s=arc-20160816; b=hTNOFXtrofDmXois8eoyOk7L9iIZj/rInO0KT0Y+kdj0WyF2SwkY+ILJQO/AJv1J+q UYzNnM6nTa3wj3Ee+de7++2PSObH8Wp5R+g6RgVGLj3OgV73+g6DIQM8WnkX9AYMv7aL gbOEYJL5QRYy/VICCp97SsSMTw/1rrpEY4tuvTwNleBbeaad4IUyW6hpZLGPs5Ul0oi2 4eKZw8ZxjMuhC0SzZEEJYwfSBqpnyFaqLG5NHljo6pvDGlz2rjBIY3IB2b7Qmn+GYIIm Q6s3fH/nhjmVlY5IbFHyEUmb88gKtddA3rTJ6fiaMPkgvCrw788hxUbBTHCVUpC47kBh FfwA== 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=nCVC1QMo1jQQYjVTaeSTUF2Y/6DYhKb+o5XaBdEPSiY=; b=maEcoXyYtFAxxjEy2JCOZhf8ISa54DAeY9/qMiCRG1elfv9PSnssHwXONbt1eW9zE2 vexPe67XRngwXMj6jYzSPDN0UTeDAHhTuL7uZlQNKDdjGp8ILa6nWuELlxf2Lyy/g1oj wuTJkpzTFqZ1eBxy76TM/1OdIs2VAZHjOk3kE9fZtf7eQAprPY0poObVcxDQWcz1utWv 7Cw7nP1KGPlrVqYceEXKDyx/vRy9zJR85qj/LuDDAhmShMIz6Icue2o99w/JOhtf9Yhw 7fQR4Z2My9AbLC/diqZbqvvbHrkmXyxNz6foj4uVSB2+Jd2SNidTI0dq8qo6tIoEGn5u athw== 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 x13-v6si1372613pln.62.2018.07.03.08.56.32; Tue, 03 Jul 2018 08:56:47 -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 S933467AbeGCPzp (ORCPT + 99 others); Tue, 3 Jul 2018 11:55:45 -0400 Received: from smtprelay0161.hostedemail.com ([216.40.44.161]:52306 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932234AbeGCPzn (ORCPT ); Tue, 3 Jul 2018 11:55:43 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id EAB02837F27F; Tue, 3 Jul 2018 15:55:42 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:960:968: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:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:5007:6119:7903:7904:10004:10400:10450:10455:10848:11026:11232:11473:11658:11914:12048:12296:12740:12760:12895:13069:13095:13311:13357:13439:14659:14721:19904:19999:21080:21212:21433:21451:21627:30003: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: jump16_31b79732acd36 X-Filterd-Recvd-Size: 2497 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Tue, 3 Jul 2018 15:55:41 +0000 (UTC) Message-ID: Subject: Re: [PATCH] iommu/amd: fix missing tag from dev_err message From: Joe Perches To: Gary R Hook , Colin King , Joerg Roedel , iommu@lists.linux-foundation.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 03 Jul 2018 08:55:40 -0700 In-Reply-To: References: <20180703064005.18908-1-colin.king@canonical.com> <6763ec382f8d629f5f356f4cc023f20c2f76b26a.camel@perches.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 Tue, 2018-07-03 at 07:56 -0500, Gary R Hook wrote: > On 07/03/2018 05:07 AM, Joe Perches wrote: > > On Tue, 2018-07-03 at 07:40 +0100, Colin King wrote: > > > Currently tag is being assigned but not used, it is missing from > > > the dev_err message, so add it in. > > > > > > Cleans up clang warning: > > > warning: variable 'tag' set but not used [-Wunused-but-set-variable] > > > > [] > > > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c > > > > [] > > > @@ -616,9 +616,9 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt) > > > pasid = ((event[0] >> 16) & 0xFFFF) > > > | ((event[1] << 6) & 0xF0000); > > > tag = event[1] & 0x03FF; > > > - dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x]\n", > > > + dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%016llx flags=0x%04x tag=0x%03x]\n", > > > PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), > > > - pasid, address, flags); > > > + pasid, address, flags, tag); > > > > Seems to have a superfluous ] that should be removed. > > Yeah, I pretty much messed up all of the log messages in that function. > My apologies. I'll create a patch for that problem; it shouldn't be > fixed here. I also wonder why event is declared volatile and then dereferenced with [] multiple times. Maybe each array dereference should be stored as a local variable instead.