Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1163697imi; Fri, 22 Jul 2022 19:34:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ucR8ROSZvt1oYe7EbmHb6IwUqnI9q3/9TlI8qu4XufQ7aapThpxyUtLp3EO7FdAM15eB+3 X-Received: by 2002:a05:6402:35d1:b0:43a:cb5b:208b with SMTP id z17-20020a05640235d100b0043acb5b208bmr2370747edc.275.1658543665354; Fri, 22 Jul 2022 19:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658543665; cv=none; d=google.com; s=arc-20160816; b=jqLuKJl6kTrGzXvqAE48b57ebWn0rtIpIBBhKEVHnhAqlASrobhFtL5sLDNV1N8nQv YWiKRQin/HO0PeMWCx/C//6iNrR2Purvop0bM6+Dq1NAFhhxybHOf+7Pxdss+dqOLym4 DGIef/702k99wNuvK+xIWY+AAtkISnR7xPrB4x8lrvGVxg5fRd2H4a0b4zprAaFpVbGd R1gVlpYqulYRrp3OlN9mVOx9qkcACp3SwL0ZnoUXh60VY4QEB2H7a4mGv710J6YkQWjz U1p+3S4TwDkFzAZqxZ/rGjKHzJusBTfJtzYrzeN/DwJ1fTZMnkhUIeoLV9YhMYv4Kceq Shdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=r6H8gEUo+/55gjeJQm0FZr9ow/R3ENj3byMyZCajUv4=; b=NUgfYwBBaYpjtP/u1Bdg3Ljjrpie0J+Grq6ZgwlC3KcmMJeY/G5vToWaE66QSfbaEw 9tTZAI3dnSRkvzx1WC7lNzbRidygx9n8gFXzXr9rY1vXaiCUfrhlQwoIR+fK5Qw535nW q1S9XT2MWzAxgWJDBPxmGGaUI/adu5aI4REw+Mzh0zbL+GK3jXk7zZok6i9aLyHRRupg 7bw08kMyRRMPXT057BM6xwS4Ydbwh+GDfsRC30co/MHdmiV3k9PbgCnss4JbHNLuqb33 b3IBQ0hX3TPLcFntWlr96hxIZ438KbxoD+VxmPtVgoEgtyT4erznYGPHUqawy19gVU2F W+bA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw21-20020a170906479500b006e7fe1e4eb4si7929484ejc.847.2022.07.22.19.33.56; Fri, 22 Jul 2022 19:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236813AbiGWCPr (ORCPT + 99 others); Fri, 22 Jul 2022 22:15:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235769AbiGWCPp (ORCPT ); Fri, 22 Jul 2022 22:15:45 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC39F820EE; Fri, 22 Jul 2022 19:15:44 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4LqVHZ15GWzKH7q; Sat, 23 Jul 2022 10:14:34 +0800 (CST) Received: from [10.174.176.73] (unknown [10.174.176.73]) by APP3 (Coremail) with SMTP id _Ch0CgAXemnMWdtiwj1WBA--.40945S3; Sat, 23 Jul 2022 10:15:41 +0800 (CST) Subject: Re: [PATCH] nbd: add missing definition of pr_fmt To: Yu Kuai , Joe Perches , josef@toxicpanda.com, axboe@kernel.dk, houtao1@huawei.com Cc: linux-block@vger.kernel.org, nbd@other.debian.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com References: <20220706093320.1962871-1-yukuai1@huaweicloud.com> <853a5164-78cf-1ccb-8e18-cff5b5bce4ff@huaweicloud.com> <49a8099eb7dd01e9d2d190056171341d87cd442b.camel@perches.com> <0dba2f0c-ba02-853e-60e7-873eabedcd80@huaweicloud.com> From: Yu Kuai Message-ID: Date: Sat, 23 Jul 2022 10:15:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <0dba2f0c-ba02-853e-60e7-873eabedcd80@huaweicloud.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: _Ch0CgAXemnMWdtiwj1WBA--.40945S3 X-Coremail-Antispam: 1UD129KBjvJXoW7XF17XryDCFyrCw4rCF43Awb_yoW8JrWDpF 4qya4kCr4vyr45G3WIyw1Skry3t3Z7Jr1ag34UZ3y09a9xCas3Ar17AFnYqrWvvr4kKw12 9F4Dt3y8AF1rWrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUyKb4IE77IF4wAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6r1S6rWUM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04k20xvY0x0E wIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04 k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY 1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUrR6zUUUUU X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! 在 2022/07/20 19:46, Yu Kuai 写道: > Hi ! > > 在 2022/07/18 22:32, Joe Perches 写道: >> On Mon, 2022-07-18 at 21:52 +0800, Yu Kuai wrote: >>> 在 2022/07/06 17:33, Yu Kuai 写道: >>>> From: Yu Kuai >>>> >>>> commit 1243172d5894 ("nbd: use pr_err to output error message") tries >>>> to define pr_fmt and use short pr_err() to output error message, >>>> however, the definition is missed. >>> friendly ping ... >> [] >>>> diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c >> [] >>>> @@ -44,6 +44,9 @@ >>>>    #include >>>>    #include >>>> +#undef pr_fmt >>>> +#define pr_fmt(fmt) "nbd: " fmt >>>> + >> Typically, this #define is place before all #include lines >> so there is no need for an #undef I tried to remove the #undef: --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -44,7 +44,6 @@ #include #include #define pr_fmt(fmt) "nbd: " fmt And then following warning is triggered: drivers/block/nbd.c:47: warning: "pr_fmt" redefined 47 | #define pr_fmt(fmt) "nbd: " fmt It semms that keeping that #undef is the right thing to do. Thanks, Kuai > > Thanks for you advice, I'll do that in v2. > > Kuai > > . >