Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1369954pxj; Fri, 18 Jun 2021 05:50:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyngvlZSVELwmot85hh/B/y4vW4uhEDJmOy5D8OV/SoZ5HLlNbNA/aeZbPb7dkLHNhxBMT4 X-Received: by 2002:a50:fb17:: with SMTP id d23mr2074973edq.58.1624020656508; Fri, 18 Jun 2021 05:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624020656; cv=none; d=google.com; s=arc-20160816; b=jfOHtQ7rc1oZfiUz3YXs7/XC1Vh/OdZfGUORaNqhnG3zP1SgZ5+4DIJt+H16rSAyKt IOePkWR1SQh0+UrFpjhdoLlhWJ4eX0BTNvQTyduzxLAn/Uf5opIcztvvkP0zdi10/QFF XlpI7Kmw+RcKLu8aQZipNjdNNFx3e3qEAIWtLjat2hLio9/5OCpdZpd105cu6oWAlFoZ oq1x2ocg+kpxVO4Q4+gAFrF3+crqpxaPXLJfOAeUQ6Icl6oQE2UvHxOk/jOkq3pz0JDR htNmvBLzs3YfRCi2gE/87RAK3v4Gz4QeWDhKAomG4H5V27LaI6VE6c9QULDiUoenKc4i /D0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BS3omeOppyoShd1+LwrhmXqufv0Lv657lMEmOyaYMYw=; b=aZo7uvPX2/0D2l4ABmR8pJmJWKl2FicP7Ln0EJRp7tHv4XQPmrZkQSD/8Lx8tbG3Mb 5qmXL0SxhI4rNb321xioFF88jQZDWl5F25tLynphpdRmQMabDyzJp4e8yB/+Fm2eTmVP dqV2LcP62LRifDklz6CxwV5vjqvzWBqO7UfS3PkcdRM8lCwlW57x8v+NiuDQWGUTtjXn to+Kq511G8BahnNMuqdzR4WuzBHgU3bR9+Ufyv1C6UNcxsb0FWN0l/d9m6+dc8Shf649 pTwEkFddhMl5iL4cVSdQTWxw7fPvGNnCsAWBdmWduhrqqZwdltE4J2RHu/vyM2vHhLoU lpcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gb36UT4i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si7818832edb.287.2021.06.18.05.50.33; Fri, 18 Jun 2021 05:50:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Gb36UT4i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230070AbhFRMFW (ORCPT + 99 others); Fri, 18 Jun 2021 08:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231345AbhFRMFV (ORCPT ); Fri, 18 Jun 2021 08:05:21 -0400 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A710AC061574 for ; Fri, 18 Jun 2021 05:03:12 -0700 (PDT) Received: by mail-qk1-x72f.google.com with SMTP id j62so10246596qke.10 for ; Fri, 18 Jun 2021 05:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BS3omeOppyoShd1+LwrhmXqufv0Lv657lMEmOyaYMYw=; b=Gb36UT4iH8mrlI9grJsKcZc/6dVSCOhopbItrzJzkGDG4s2ViSK6ACPCaNiqfdqkr5 HC5mPohZzo+oDK0ll4HXl/ANn4FMqgbGZRDTtzDK7E9nS01pkQh0mPiGuW9YRXGw6xvc yfuQheWzKELjxip6d2MHYymQOp0pD1K8UJEcmGHd6Ttk2jeaRscoDYk7/mSbFQQDZ7v1 uVhgAkjx/Qe5xVT0A1jsn34L8DOFMtIapGd3TLcDlxSPFForVq1BkRYm9NjNnQ1PcACn PpNj6AlCXFm/o2vfe4DqLu6mNzIiMKUS2KvUnRzTSCCX0di7tZfd3QjkgeWhazjKHqeu 9HLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BS3omeOppyoShd1+LwrhmXqufv0Lv657lMEmOyaYMYw=; b=Oi6fRNDV9q0+ibUYD3ojY5ZDyRMK5CJyZhsWjCtXe7RMFItu1tNCuK+/Ao80z83+mk +am0+S9od090KfK2VOrHtMz68YSDU2FemXlx+QBK8Gqsx6vHxD6iv8UNmyH1KgLOhSmh igKE4DREQ7wi+UVY07HY7A87vkV9uHH3XzHuj/ulNFrfywH3Sn9USA2QQE3JwfG+PxGv s0uKk+9xuKwnbiOdBluhRndn0xvQxUMAAeEhoc84xYpx6gHGq6HLSJfXJrdH+Ct5RY9y csGqf461X7/JlMVSHqRF+/wFcoxccydy68X6rda5uVL/lndMoyvTSrVkORO/IcalHPeI pQkw== X-Gm-Message-State: AOAM53098wEpI75sylN0qCMXBMa1Pnk/D56TJEaIYi3iG0+8eCPt5TJF hVPEeOt8OpDKVsvfEFsMnMBkcJcUIJE0Ym8BSatbZF7uuv8= X-Received: by 2002:a25:8b86:: with SMTP id j6mr12009074ybl.470.1624017791766; Fri, 18 Jun 2021 05:03:11 -0700 (PDT) MIME-Version: 1.0 References: <1624013943-13935-1-git-send-email-gumingtao@xiaomi.com> In-Reply-To: <1624013943-13935-1-git-send-email-gumingtao@xiaomi.com> From: Lukas Bulwahn Date: Fri, 18 Jun 2021 14:03:04 +0200 Message-ID: Subject: Re: [PATCH] slab: Use %s instead of function name To: gumingtao Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, Andrew Morton , Vlastimil Babka , Nathan Chancellor , Nick Desaulniers , Linux-MM , Linux Kernel Mailing List , clang-built-linux , gumingtao Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 18, 2021 at 12:59 PM gumingtao wrote: > > It is better to replace the function name with %s. > > Signed-off-by: gumingtao > --- > mm/slab_common.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/slab_common.c b/mm/slab_common.c > index a4a5714..36127dc 100644 > --- a/mm/slab_common.c > +++ b/mm/slab_common.c > @@ -381,8 +381,8 @@ kmem_cache_create_usercopy(const char *name, > panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n", I am just wondering: Can you also make that refactoring change for the panic() call as well? How about checking the whole file for such patterns and doing that change for all occurrences? > name, err); > else { > - pr_warn("kmem_cache_create(%s) failed with error %d\n", > - name, err); > + pr_warn("%s(%s) failed with error %d\n", > + __func__, name, err); > dump_stack(); > } > return NULL; > -- > 2.7.4 >