Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp944852ybz; Fri, 1 May 2020 11:24:00 -0700 (PDT) X-Google-Smtp-Source: APiQypIJC/HypDPzbMxF+DvoBGFrexCfzzbPf4gcfLM0fG9Cw+jXapKZWGLOxzbWPr8fdD4e6VdJ X-Received: by 2002:a17:906:9442:: with SMTP id z2mr4170007ejx.249.1588357440757; Fri, 01 May 2020 11:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588357440; cv=none; d=google.com; s=arc-20160816; b=QeS3EWVVFThw/l10VkoRQmCdUT7lgtunC+OkIZY1sCPGcugEE9jVS2L14bNIYcSHrB K9fcNJJxcZ2xQA7klzSe/XpsjeQrNKELI71OP9YceB6DMEmMKem55m2w/e8IaJoZvQ39 ccLQqItFOV6dz0uBpnOOKp5Bn9aFwhye1HFPZsuH29r2CN+J8WJUmMowfVAqcZXXbr45 /NJbK9Txlbk7Y8kIsmpNhiDJ7xAb5Wg/xskRQIgB+g0WzpmpVIXz37nz8JzfNxyMDV6Z zfIUBuSoj1clNuZALAEdgNZidRpjq1N4dgX4CXx9GJabn69k5VPTFhtcCECCiA3shxHd 62MA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:subject:autocrypt:from:references:cc:to; bh=8+Jd8UCtLAIGXZVwCPsEaZASdfjfz3pNWNDidIes4aw=; b=Wto8xbfIJlKkLsIqrgUaRj5zMM8OQMhgjicbac+S2lFPV1EilC7h7I16DxqMHT8No1 b9e+w8IeKyp///9TYThd1ya4fpL0QJqIwq5yei986tlRja1ntEP7StpgF2Fod6XGEhKO FV243dexUf71axKBIpbUAmYQyEUNckfJvoPFImPvXMqJehr6AjfOnxgCEMQW/rHyNUyt QQIFxSk4PFwzXfKsO3CSaZ5GG7nG1k5rZcn0tWlujK133cem5yWrzqU+fAXcKVkx+kRD 6FLo74IdXKLlQtMu8x8DFF+dFfRfsfFpyXo9MkpPpMSdLscaEyIv0R/BULrXIDuKa/IZ qYVw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qq22si2128686ejb.523.2020.05.01.11.23.37; Fri, 01 May 2020 11:24:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730449AbgEASWJ (ORCPT + 99 others); Fri, 1 May 2020 14:22:09 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36575 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729599AbgEASWI (ORCPT ); Fri, 1 May 2020 14:22:08 -0400 Received: by mail-lj1-f193.google.com with SMTP id u15so3415225ljd.3; Fri, 01 May 2020 11:22:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=8+Jd8UCtLAIGXZVwCPsEaZASdfjfz3pNWNDidIes4aw=; b=dRRsAnjqiO0Y/IRyiyuai5zwBNd3KeGPMbwXZk3b9EB0W/L1eP3dEqK5WWmQOHE4BH abMjQ7vV1U/hv5DCXHE9dggAbPTYHmYW8CqLyeuuaDYeyCoTVmFl/InhR6aCSU80JwCr Fjk02IEYIUkbSmNe03Gx1ylnlJCRx/h4TexrfFRpezPtCxNxvZW16RSwBzAxaUCqv/co vK1KPnu5zizR5YcdXwRuKU4cZQdZ6tkerJlBpccXyldtwbAvyymxhqjSg4ZgDpRYiAB8 MlN+ywOpXaRX3B0b6E+TaeWjPgJ0yv5vInaEAa0DvjtbfhLTBzDPqX5kxesd7Ev176ID EnJg== X-Gm-Message-State: AGi0PubznVb4QtzoHEWXY6qZbezo4u5Xg+bFBtenCn/EwVT53+z8bQh0 lJpa6WyVhn4Yd4xXBeC7+7u4ue9nNOE= X-Received: by 2002:a2e:553:: with SMTP id 80mr3094778ljf.147.1588357325092; Fri, 01 May 2020 11:22:05 -0700 (PDT) Received: from [192.168.1.8] ([213.87.150.177]) by smtp.gmail.com with ESMTPSA id o20sm2681967lfc.39.2020.05.01.11.22.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 May 2020 11:22:04 -0700 (PDT) To: Joe Perches , linux-block@vger.kernel.org Cc: Willy Tarreau , Christoph Hellwig , linux-kernel@vger.kernel.org References: <20200501134416.72248-1-efremov@linux.com> From: Denis Efremov Autocrypt: addr=efremov@linux.com; keydata= mQINBFsJUXwBEADDnzbOGE/X5ZdHqpK/kNmR7AY39b/rR+2Wm/VbQHV+jpGk8ZL07iOWnVe1 ZInSp3Ze+scB4ZK+y48z0YDvKUU3L85Nb31UASB2bgWIV+8tmW4kV8a2PosqIc4wp4/Qa2A/ Ip6q+bWurxOOjyJkfzt51p6Th4FTUsuoxINKRMjHrs/0y5oEc7Wt/1qk2ljmnSocg3fMxo8+ y6IxmXt5tYvt+FfBqx/1XwXuOSd0WOku+/jscYmBPwyrLdk/pMSnnld6a2Fp1zxWIKz+4VJm QEIlCTe5SO3h5sozpXeWS916VwwCuf8oov6706yC4MlmAqsQpBdoihQEA7zgh+pk10sCvviX FYM4gIcoMkKRex/NSqmeh3VmvQunEv6P+hNMKnIlZ2eJGQpz/ezwqNtV/przO95FSMOQxvQY 11TbyNxudW4FBx6K3fzKjw5d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Nu5iVLPRwlxFS/+o3nB1ZWTwu8I6s2ZF5TAgBfEONV5MIYH3fOb5+ r/HYPye7puSmQ2LCXy7X5IIsnAoxSrcFYq9nGfHNcXhm5x6WjYC0Kz8l4lfwWo8PIpZ8x57v gTH1PI5R4WdRQijLxLCW/AaiuoEYuOLAoW481XtZb0GRRe+Tm9z/fCbkEveyPiDK7oZahBM7 QdWEEV8mqJoOZ3xxqMlJrxKM9SDF+auB4zWGz5jGzCDAx/0qMUrVn2+v8i4oEKW6IUdV7axW Nk9a+EF5JSTbfv0JBYeSHK3WRklSYLdsMRhaCKhSbwo8Xgn/m6a92fKd3NnObvRe76iIEMSw 60iagNE6AFFzuF/GvoIHb2oDUIX4z+/D0TBWH9ADNptmuE+LZnlPUAAEzRgUFtlN5LtJP8ph Subject: Re: [PATCH v3 0/4] floppy: suppress UBSAN warning in setup_rw_floppy() Message-ID: <2c506547-236e-02e2-53f1-9484ba6ae453@linux.com> Date: Fri, 1 May 2020 21:22:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/1/20 9:02 PM, Joe Perches wrote: > On Fri, 2020-05-01 at 16:44 +0300, Denis Efremov wrote: >> These patches are based on Willy's cleanup patches >> https://lkml.org/lkml/2020/3/31/609. > > Maybe add pr_fmt and clean up a few messages so > all the logging output is prefixed too. > Yes, I'm preparing next patchset with almost the same pr_fmt patch in it. However, simply adding pr_fmt is not enough. We need to remove DPRINT macro from the driver because it uses current_drive and this is wrong after Willy's cleanups. #define DPRINT(format, args...) \ pr_info("floppy%d: " format, current_drive, ##args) I also don't like debug_dcl and how it is used. > --- > drivers/block/floppy.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c > index c3daa64..b26bb1 100644 > --- a/drivers/block/floppy.c > +++ b/drivers/block/floppy.c > @@ -145,6 +145,8 @@ > * Better audit of register_blkdev. > */ > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > + > #undef FLOPPY_SILENT_DCL_CLEAR > > #define REALLY_SLOW_IO > @@ -1724,7 +1726,7 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id) > if (current_fdc >= N_FDC || fdc_state[current_fdc].address == -1) { > /* we don't even know which FDC is the culprit */ > pr_info("DOR0=%x\n", fdc_state[0].dor); > - pr_info("floppy interrupt on bizarre fdc %d\n", current_fdc); > + pr_info("interrupt on bizarre fdc %d\n", current_fdc); > pr_info("handler=%ps\n", handler); > is_alive(__func__, "bizarre fdc"); > return IRQ_NONE; > @@ -2276,7 +2278,7 @@ static void request_done(int uptodate) > reschedule_timeout(MAXTIMEOUT, msg); > > if (!req) { > - pr_info("floppy.c: no request in request_done\n"); > + pr_info("no request in request_done\n"); > return; > } > > @@ -4181,8 +4183,7 @@ static void floppy_rb0_cb(struct bio *bio) > int drive = cbdata->drive; > > if (bio->bi_status) { > - pr_info("floppy: error %d while reading block 0\n", > - bio->bi_status); > + pr_info("error %d while reading block 0\n", bio->bi_status); > set_bit(FD_OPEN_SHOULD_FAIL_BIT, &drive_state[drive].flags); > } > complete(&cbdata->complete); > @@ -4954,7 +4955,7 @@ static void floppy_release_irq_and_dma(void) > #endif > > if (delayed_work_pending(&fd_timeout)) > - pr_info("floppy timer still active:%s\n", timeout_message); > + pr_info("timer still active:%s\n", timeout_message); > if (delayed_work_pending(&fd_timer)) > pr_info("auxiliary floppy timer still active\n"); > if (work_pending(&floppy_work)) > >