Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942482AbcJFRVk (ORCPT ); Thu, 6 Oct 2016 13:21:40 -0400 Received: from mout.web.de ([212.227.15.3]:53416 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942018AbcJFRVc (ORCPT ); Thu, 6 Oct 2016 13:21:32 -0400 Subject: Re: [PATCH 49/54] md/raid10: Replace printk() calls by the usage of higher level interfaces To: Joe Perches References: <566ABCD9.1060404@users.sourceforge.net> <786843ef-4b6f-eb04-7326-2f6f5b408826@users.sourceforge.net> <1475771616.1914.9.camel@perches.com> Cc: linux-raid@vger.kernel.org, Christoph Hellwig , Guoqing Jiang , Jens Axboe , Mike Christie , Neil Brown , Shaohua Li , Tomasz Majchrzak , LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <321cc4aa-679a-a2fe-be0b-96285b19e489@users.sourceforge.net> Date: Thu, 6 Oct 2016 19:20:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1475771616.1914.9.camel@perches.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:nVf/+b1LFvBDsDI6kT6bg8uydn1gLdDmiz8aA3VNAPvtF0VS11P b+MucrS2Tow1gUG4Gx8aUSOvOdTpNpGMuBMsOkEmsS/aDeHVHpqylxZNDqgHCg4M+g/k+Cz lMBO+uAFE7ERwsMDiLQpAwpZLW/A3shMZXkvKCzZOB8ocsiEZoj2alwepo1V5LqA8bl/XIW 3V4RhXziBT/QjxmuoFDNw== X-UI-Out-Filterresults: notjunk:1;V01:K0:DNzPQPLZY1Y=:EhrDZi9eNv/Ce6RBWY3BOj GyFOzFVqowM5/9yArU/tBv5RO6pajl2Th8DXIEtD9VOl67y37Jnee1qO9GGUtjFQ6Vho+K64r 63VXsV4SQLjlVVc4y3+MPBQ7JVFxHSvvAns4VOT2KSDNSfLoVHRf1V6zV4PKK0B6KxzWeK0Kl 9tPWw2P8YLwLblDoGLIDjUKZeVEoRPmTnUgKS1CsiLLtFNZPUyeIL/6vtmlJiDAgJ2fy9LHsp qartfZuzoVHw0B7CC3EjoXgdob0nPQBYeiT1eNkHsS3UosXzYYjVKxpgHLZMrwECOSqpDKUq8 laeF9qunQvUKMzr6/DxaJZRAAFd3JM9kt/B2GRnomGe5RqJLTn6n7WehHW7UtpkcjXftzErQn 1yt2rmO+6gex/oqLN7qM/fn/qVl8Xs8gzFMpYNv3yW2nQ7EqrxPVhiEpj1SemH4ssRXcDkuc+ nfoS4d4qMl6PV/fzqss8gKBkH6V502VF0JZzjj90rb8Tm3FLmZD4lbZNzoqPfDIcBKmDEMVYF GShbNM5sNuWLM31meGDjF0Zjzv8AII5Zm2U2eczk0kKVgYBBqk2cxGBfQnTcQ5SHNHQhMBWom Nxjmb9kG1RE9qRj+ImmTFV1m1Kfyok3W0sYKzlTOK8Nmz25v57p54RU9LAprTBSjKD0g5phYN XnYtCcDF6da0bvMiMkEVi4XzP1TkoaXaVgGSGsLcfSzuVaymitCKSE4XtOfjNVDrOwr+M/Fwm EUSg+JWTHjl1K3FuJPYVFdEF+84jkV/PVg3H5cZkSb3+JptwvRUpt1r9qDwD0abgx5xMYCImo dUhWret Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 923 Lines: 28 >> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c >> index 5119846..0f2cb20 100644 >> --- a/drivers/md/raid10.c >> +++ b/drivers/md/raid10.c >> @@ -18,6 +18,8 @@ >> * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >> */ >> >> +#define MY_LOG_PREFIX KBUILD_MODNAME ": " >> +#define pr_fmt(fmt) MY_LOG_PREFIX fmt > > Please just use > > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > like the more than thousand other uses in the kernel. Thanks for your suggestion. I got the impression that the omission of a macro like "MY_LOG_PREFIX" would not really work for the suggested source code transformation so far. How should a multiline log message be achieved as it was constructed in the function "raid10_error" (for example)? https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/md/raid10.c?id=c802e87fbe2d4dd58982d01b3c39bc5a781223aa#n1589 Regards, Markus