Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4588384pxb; Wed, 20 Apr 2022 06:27:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXaz3fGXkUobElj63bk9Ty1oasIkg1opEoQ3XmmL2a08tNQq1PLqSa5j+bt6V909Q7rSMi X-Received: by 2002:a17:906:7c5:b0:6e8:7c6f:4f49 with SMTP id m5-20020a17090607c500b006e87c6f4f49mr18501187ejc.378.1650461252979; Wed, 20 Apr 2022 06:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650461252; cv=none; d=google.com; s=arc-20160816; b=a00ue/g7zz37gusegoIcTNJqWFCH4kOPEXCmNcNBLuSkh2BDlYBGOiolqhTz7MODXQ VstnJn/8M9Zcvd109UXvz6eKbG0CBAdVtlcvACaN3o593iJJo1oduCFK7hZcS5eqB1Gr XSNNK9huReJZ1XRHdxMxpywo9JmNByffjkTkfAOkSQIvJcSwq3fyPB620deiJbYctXt6 m9J1vcCjaghCn20NBx7RNh+nu+4laeiQO3go+xqhgTJWDA8pJqcihAQinPCc4THhbkK3 DSH+/1UMIRPsuGqOhY+ETFFfdkGi5t+2sxpqAwYptIaXBGKI6AMe1xKV4MSOMkc8ZcKJ yvKw== 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; bh=AKA9OdpVAxszLmhE22toGS/7VP7U4z/nzrtw9SumhDU=; b=y0Iv6l0EVQn6XuKer3u+Qy/3UpKJgOxg3958lPIt5U/Ur52w99ckBqDDvMxSpl6gUr vFKVwOwHsoXZoHcOyT6Dbg3xx6u9J3A99xqNT0SIuyEPh1Xc9fPrZD63BmNtbke8fjQ/ hh1rCj/xUeA/0piWltq7hpcNMNqFQLANnoi1faQoj5zJtJLAJ+zdx14UY/9g/WaiUjH8 peo324SxTNFsmel1P3XtC4RapZMuMuMsroZWCZ5a2TwUhNUIIHjhA3CGRz0AIM7lV9jO BLx/gSAqsipCf54DTNQTf7k2m9W2k+3642PFxtu2/EsUVZToL9wCcTPsi4gOJnOdrQ28 C0jg== 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 j7-20020a17090643c700b006dfe7bc2fafsi1803469ejn.56.2022.04.20.06.27.08; Wed, 20 Apr 2022 06:27:32 -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 S241845AbiDSJp1 (ORCPT + 99 others); Tue, 19 Apr 2022 05:45:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241820AbiDSJpJ (ORCPT ); Tue, 19 Apr 2022 05:45:09 -0400 Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51D7B19016; Tue, 19 Apr 2022 02:42:27 -0700 (PDT) Received: by mail-qv1-f52.google.com with SMTP id n11so12745756qvl.0; Tue, 19 Apr 2022 02:42:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AKA9OdpVAxszLmhE22toGS/7VP7U4z/nzrtw9SumhDU=; b=fbodEKP9lT212pX7fFgrAjNBNLyJqR++z/uk0Vhs8OVo/6GEJlOWTWC4GxdAIcj9ur faHmiRp/7ALh1RITuAmFivYHYkgRUiC/OqJpgrA5xwszlQIxVyGprQB8CT2HozulFnV8 BtHixaaxA86WxP6LQH0Dr16gTmSR++UN/x6QGh9LrUJPfLs6mywZ7doIdcApTVXs7Z8P dAx5xjbGdwVNINvpBgRfESarm7QJRMwTCzfnJM/9Yta8HKT9hQF7is/3T5t04AcIIf1f AAYGGjSIGS5EOMFjco7o+p4+3OrVNtMvJdYbLKP5P2zn4qE0TDgUf3Q2s+3so3PQJEZl rDGg== X-Gm-Message-State: AOAM533N45/JyiEQ9A13C+US/uTVk7T+7aouZL0u74e4S171oXpY95y9 crTSg1f/ksrRVihZ/9mVote4YM5UkV3JDA== X-Received: by 2002:a05:6214:2627:b0:446:6577:6ef8 with SMTP id gv7-20020a056214262700b0044665776ef8mr4606923qvb.85.1650361346310; Tue, 19 Apr 2022 02:42:26 -0700 (PDT) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com. [209.85.219.175]) by smtp.gmail.com with ESMTPSA id 21-20020ac85715000000b002e1ce9605ffsm9187148qtw.65.2022.04.19.02.42.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Apr 2022 02:42:25 -0700 (PDT) Received: by mail-yb1-f175.google.com with SMTP id d19so1597711ybc.5; Tue, 19 Apr 2022 02:42:25 -0700 (PDT) X-Received: by 2002:a25:9e89:0:b0:63c:ad37:a5de with SMTP id p9-20020a259e89000000b0063cad37a5demr13915294ybq.342.1650361345280; Tue, 19 Apr 2022 02:42:25 -0700 (PDT) MIME-Version: 1.0 References: <20220414081257.1487499-1-vincent.whitchurch@axis.com> <76a7b33d-6f8b-e660-c64d-027b1bc8e308@landley.net> In-Reply-To: <76a7b33d-6f8b-e660-c64d-027b1bc8e308@landley.net> From: Geert Uytterhoeven Date: Tue, 19 Apr 2022 11:42:14 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] sh: make !MMU iounmap an inline function To: Rich Felker , Yoshinori Sato Cc: Vincent Whitchurch , kernel@axis.com, Christoph Hellwig , kernel test robot , Linux-sh list , Linux Kernel Mailing List , Rob Landley , Andrew Morton , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Rich, Sato-san, On Sat, Apr 16, 2022 at 12:01 AM Rob Landley wrote: > On 4/14/22 03:12, Vincent Whitchurch wrote: > > The current definition of sh's !MMU iounmap makes it unusable in certain > > kinds of code, such as this instance caught by 0day on a patch posted to > > the mailing lists: > > > > In file included from include/linux/io.h:13, > > from drivers/mtd/devices/phram.c:21: > > drivers/mtd/devices/phram.c: In function 'register_device': > > arch/sh/include/asm/io.h:274:33: error: expected expression before 'do' > > 274 | #define iounmap(addr) do { } while (0) > > | ^~ > > drivers/mtd/devices/phram.c:150:44: note: in expansion of macro 'iounmap' > > 150 | cached ? memunmap(new->mtd.priv) : iounmap(new->mtd.priv); > > | ^~~~~~~ > > > > Make it an inline function as it was earlier. > > > > Link: https://lore.kernel.org/lkml/202204131446.omJ5mC54-lkp@intel.com/ > > Fixes: 13f1fc870dd747131 ("sh: move the ioremap implementation out of line") > > Reported-by: kernel test robot > > Signed-off-by: Vincent Whitchurch > > Tested-by: Rob Landley > > Worked For Me. Can we please get any of [1], [2], [3], or [4] applied and sent upstream, so people can stop wasting time on recreating and resubmitting similar patches all the time? Thank you! [1] PATCH] sh: Fix set but not used warnings with !CONFIG_MMU https://lore.kernel.org/r/20201208182117.163642-2-sam@ravnborg.org [2] [PATCH] sh: make iounmap() a static inline again https://lore.kernel.org/r/20220105085746.1116726-1-mkl@pengutronix.de [3] [PATCH] sh: Convert nommu io{re,un}map() to static inline functions https://lore.kernel.org/r/4ed0a7a0d3fa912a5b44c451884818f2c138ef42.1644914600.git.geert+renesas@glider.be/ [4] [PATCH] sh: make !MMU iounmap an inline function https://lore.kernel.org/r/20220414081257.1487499-1-vincent.whitchurch@axis.com/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds