From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C050C433F5 for ; Fri, 20 May 2022 21:44:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346218AbiETVoP (ORCPT ); Fri, 20 May 2022 17:44:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233867AbiETVoM (ORCPT ); Fri, 20 May 2022 17:44:12 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 953E714916C for ; Fri, 20 May 2022 14:44:11 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id w17-20020a17090a529100b001db302efed6so8849725pjh.4 for ; Fri, 20 May 2022 14:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=po9hx/FFDA/6UFacoo9gPW8IQQNzUvQfbnbKwHyRNfM=; b=DDxHO5JVhIiDbdzCxdfA0tUrkzF7fKrRar/uMUsL1M7HdWh3OTpsIJ4fFwMJf/TKIy xGM5ZBcR/LSQnSGAXdweZtBtdAX9koFKgnM7X/4VUv+HqAfTch4uyhHnLrT4H2VfXxzd wNxTMH+58XJHuVAxzjV479+UZqDapJNvOYDW/bQNUgfi7gFSbIuj16W7xoZMJnxXCWQE XFDKVomXwOhErgEjEBbc199V+IgNXDMV0J5ZHfhtXOezugiMyMHfUdzVoMRek7wzECLO CfOGSEQ9QNtvlMlUw8E36E34uoM7LVV8SHNIJWZiuDkJYCPuVULjLI5SwbIzVSMYzbzy k+BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=po9hx/FFDA/6UFacoo9gPW8IQQNzUvQfbnbKwHyRNfM=; b=48YKqlo9N7nE95wl/b4FqxTXI6XtrNgJexpP0P2SRbX/CctXvyaBCLyHR1l/fF0y0b UInYuuy9mCgLVF6em8RUx+/AeN7/A/So0f89GcL41yczdJz61JCA7bBJ5L4btQhU68aZ O3VfRb5O7vXt8SiMqj8LvHKRMo/YUKYDsJet18skIuXS5hUQG7+p7oEtG6CxJl09VyLr zOEVPiMlium92H7l2cozLmhWTxfuhF5/U0Rv5NyfQ80UC33Y8PZAhPpIenODYXgPgVyQ diOthOnXntymhPx0l2njg4wC+yll2WCmJU9biTdSToi3eBkxxbV99iogxFLYt5yp31Sv ly4w== X-Gm-Message-State: AOAM533+J0q10GwxOOjXPHGwcJoN+xRMW27b/XQK6PyvjX6auEuKRXFJ j/+sMXjpsb60dI2gLw0Ued4= X-Google-Smtp-Source: ABdhPJxqHG82SC/AOGlMVrEhzymuTl6S1INJ0XTrki35g6wNiT1n/spu0CIavILkAPi0IV+SxJwAtw== X-Received: by 2002:a17:902:7087:b0:161:88a4:db37 with SMTP id z7-20020a170902708700b0016188a4db37mr11492775plk.131.1653083050851; Fri, 20 May 2022 14:44:10 -0700 (PDT) Received: from [10.1.1.24] (222-155-0-244-adsl.sparkbb.co.nz. [222.155.0.244]) by smtp.gmail.com with ESMTPSA id mn2-20020a17090b188200b001df983f9a3dsm2357714pjb.29.2022.05.20.14.44.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 May 2022 14:44:10 -0700 (PDT) Subject: Re: [PATCH] m68k: atari: Make Atari ROM port I/O write macros return void To: Guenter Roeck , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org References: <286a1eef-e857-a31f-839b-00a4c835dfa9@roeck-us.net> Cc: linux-kernel@vger.kernel.org, kernel test robot From: Michael Schmitz Message-ID: Date: Sat, 21 May 2022 09:44:02 +1200 User-Agent: Mozilla/5.0 (X11; Linux ppc; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <286a1eef-e857-a31f-839b-00a4c835dfa9@roeck-us.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-m68k@vger.kernel.org Hi Guenter, I wish I knew of a way to fix this mess for good... suggestions would be welcome. Looks like you spotted the last remaining macros without a void cast here, thanks. FWIW: Reviewed-by: Michael Schmitz Am 21.05.2022 um 02:52 schrieb Guenter Roeck: > On 5/20/22 07:32, Geert Uytterhoeven wrote: >> The macros implementing Atari ROM port I/O writes do not cast away their >> output, unlike similar implementations for other I/O buses. >> When they are combined using conditional expressions in the >> definitions of >> outb() and friends, this triggers sparse warnings like: >> >> drivers/net/appletalk/cops.c:382:17: error: incompatible types in >> conditional expression (different base types): >> drivers/net/appletalk/cops.c:382:17: unsigned char >> drivers/net/appletalk/cops.c:382:17: void >> >> Fix this by adding casts to "void". >> >> Reported-by: kernel test robot >> Reported-by: Guenter Roeck >> Signed-off-by: Geert Uytterhoeven > > Reviewed-by: Guenter Roeck > >> --- >> Survived m68k/allmodconfig. >> To be queued in the m68k tree for v5.19. >> >> Removing the casts instead causes issues with functions propagating void >> return values (return expression in void function), which BTW sparse >> complains about, too. > > We live and learn. I didn't even know that this was valid syntax. > I thought it might be easier to just fix that code, but coccinelle > reports that there are hundreds of places in the kernel where this > is done. Outch. > > Guenter