Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1158740imi; Fri, 22 Jul 2022 19:22:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v8R0VPtsZWC9XaD4XuWhh8zgbLXc5Ie4QeZ6clCVZWFI64HQZU+gRWf1nceGa6m/eM6u1h X-Received: by 2002:a17:903:2ca:b0:16c:d18d:bb51 with SMTP id s10-20020a17090302ca00b0016cd18dbb51mr2585649plk.33.1658542976982; Fri, 22 Jul 2022 19:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658542976; cv=none; d=google.com; s=arc-20160816; b=Ykc6E5+jGst85+pRhI3zJyvc9I3B2J96bZk+vkPEmCT3D0q/NN/oR8ZldajCxSDM8M b+HBcw2iBxrV0VbayM86PP7V6sj4X2pWqZ7rXhHgD66Lb+su5y4Kx+HGLsPmmoYwO13K 6mAzOSY+GPYNoJOuDHVB86tOgJgrKN1G1QEYmwdRl4I6cVXZnbqwqf+cLp/Jfbci+QqT LeV3Tsg9q3u71TpGcUNbtQQM+ltYUH718T/1Yq/qQJd6nNJW4zVpubaUskK9+NgWZVqK pQrdoK/KgcMlOTGcxN94PIYOb67ybljS4XSOahvzX+8MlVQU3FKdH6S648fCl5lP4+zl 4GDw== 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=s6XVt1f53xH67KzAv67leJ0sHhRZ1+HeMUrYAQaINE8=; b=Q107yefeA2kVZidaC0AYaWeQvsusDPW6fNmSAZxVl2FvgyXZ8fb4SkMMqtMOwRs3RB ETqgP8kJIq2eo5UwpwZvd5km+J+Ae6+PWhDd5+35Lgbx+BevvpjmI5DqYrMnf+pPlG7k ypHVW9gy3Xc7sxq1D9cBVaa1x5JPKOcrw9wo99ltHtDwluEEwTkdvHbUyu8agnGbDL8J 5NSX+lWHpD9Kvnd6BN1f+z9TxW5S9R1tDPzwWf5rdqIlnxFl2NnEH4tvjFBGoSMjGTRR BvOjzzfCSdsm0ZTnz9zSKCkWaOKxOUBIVZxeusrMaienDJszR3SuGdIIRsREG45NvpBl HHWw== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c21-20020a056a000ad500b0050dfedd9c62si8256554pfl.292.2022.07.22.19.22.41; Fri, 22 Jul 2022 19:22:56 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236940AbiGWCOi (ORCPT + 99 others); Fri, 22 Jul 2022 22:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235826AbiGWCOh (ORCPT ); Fri, 22 Jul 2022 22:14:37 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F304F7697E; Fri, 22 Jul 2022 19:14:35 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LqVC62XznzWf1x; Sat, 23 Jul 2022 10:10:42 +0800 (CST) Received: from kwepemm600009.china.huawei.com (7.193.23.164) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 23 Jul 2022 10:14:32 +0800 Received: from [10.174.176.73] (10.174.176.73) by kwepemm600009.china.huawei.com (7.193.23.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 23 Jul 2022 10:14:31 +0800 Subject: Re: [PATCH] nbd: add missing definition of pr_fmt To: Yu Kuai , Joe Perches , , , CC: , , , 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: <4e6a80cb-63fa-660c-8acf-f25062800238@huawei.com> Date: Sat, 23 Jul 2022 10:14:30 +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-Originating-IP: [10.174.176.73] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600009.china.huawei.com (7.193.23.164) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 >>>> + 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 >> Typically, this #define is place before all #include lines >> so there is no need for an #undef > > Thanks for you advice, I'll do that in v2. > > Kuai > > . >