Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp179555ioo; Fri, 20 May 2022 17:55:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkv/jX74bcMxrxxubzXLAkvPxehJhf5+qJgw7j5qKg8PwG0dM5314sF4dujV7t59o59Wea X-Received: by 2002:a17:907:6d0a:b0:6f9:b861:82b8 with SMTP id sa10-20020a1709076d0a00b006f9b86182b8mr10901708ejc.478.1653094515169; Fri, 20 May 2022 17:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653094515; cv=none; d=google.com; s=arc-20160816; b=l4QEmFH7sVRWdRiI4N1nA2gjwi+xvCHDc9hK1iZPEDYPr1+D53f5j3IxuXdYpEKxYs 07CDgT+0w7FHqkq10kGNmQ/ahSxPRC3o4ZGLV2tIIIOpmK3/ZFyIBp3Udrm4gzKGV3D4 AiUetc0dG4z2IiStZCILOqTxVoUs25HTJmvssTX0kw2Pzzjr51AnvoPg2bFIgHoLV4nw DDfcCRcGKa3bcnhMbmxl/JUTJeMacQ3ba0FJ2LkDrCMuFRHGxPddrJKvVjluVnnQmkKF 0D0iS1Y17admu86dCe5OC+61ouTa/lDa7RnJaY4CQP5NV/uD7IxG1odGBtXH68xzfoqi gxFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=eMjQ4hViLnsaeIxuJQdIwdQZIFUeX5SWc8KbS9XvRCw=; b=qQrCKY+aFiyLeK6S43YUqHY1IPdvMB2sxuaqBYzwxpNxpeqvWQw9iHjuIQZQeWHHvE W/9rBroXGLpE8ReTwT0rm/2SKI387FVw/x5sKCTtjdfkLwVjR2ebtDp9ScVBE1ZQ6Zd/ xrCYlhtVBH0LFxbYJ5HA9CvShtd6QoOL7SfulvySs/NddMlQWJhX9fHoJZg7zVLKLu57 qF6rFfZH6WWuU7Aog2FzOnxXL73N7ZfxGN3M7VCK6gUo1jxkhSj5P01mi83pqZXGb5k3 cRk1Z7O4PtbShNGk8AeDPZ250ZoIwCjI9l2B3UNFNKmYLyR9LpuL+B5UJA6/JCsz3mJ6 uBxw== 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 k16-20020a1709063fd000b006f448225497si8765174ejj.672.2022.05.20.17.54.48; Fri, 20 May 2022 17:55:15 -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 S1350544AbiETPIc convert rfc822-to-8bit (ORCPT + 99 others); Fri, 20 May 2022 11:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350708AbiETPIY (ORCPT ); Fri, 20 May 2022 11:08:24 -0400 Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB4A61796EC for ; Fri, 20 May 2022 08:08:10 -0700 (PDT) Received: by mail-qv1-f47.google.com with SMTP id v5so6837137qvs.10 for ; Fri, 20 May 2022 08:08:10 -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:content-transfer-encoding; bh=pEvlCe4V/em2drNfzpLbMhZO2cZ4QaTzSiWNKrAJWLg=; b=fDlsXLxHdjDEr3FdcNIarMitIOHtvIay9vzF9SWR5X9ssFh7o6sPmkRHtXZoa4xww7 xB+6RTwOogVLrZIkB8uE3vyrYOgVGY1Ew0lYx3yBuQ0oTuuMuPOLyvPkxHHx38JGUuJA xb086y0rBJ5DDxKV7x7N07O7hyIpCvs5VviyrH0xWfmQP4ZPoeC+2lzSs/Js2JBhDj5p b7ExWgLH+yxnw4mRuEWjS9lveIbfd4/YBhvYrQjGmhm028lP8wZC0dcgEwUiO4iRqwcs wWn2Vwq5cS17fK9SdzcMxLp/UdvHHjxxkrUSm8pLqIivVIh+gwWShap91NnL88rM0qSv i+Cg== X-Gm-Message-State: AOAM533wBehR7d5FA13qHTLxFoE7Apq93RF3lf/TkaVEKJ1i04PTlmnU ylTdxJ4fese2JrpEzSjfZEdMOWL0Lthhbw== X-Received: by 2002:ad4:5bab:0:b0:461:dcad:838e with SMTP id 11-20020ad45bab000000b00461dcad838emr7975830qvq.34.1653059289196; Fri, 20 May 2022 08:08:09 -0700 (PDT) Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com. [209.85.128.180]) by smtp.gmail.com with ESMTPSA id j4-20020a37b904000000b0069fc13ce225sm3052354qkf.86.2022.05.20.08.08.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 May 2022 08:08:08 -0700 (PDT) Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-2ff155c239bso90615077b3.2 for ; Fri, 20 May 2022 08:08:08 -0700 (PDT) X-Received: by 2002:a81:9b0c:0:b0:2f4:c522:7d3c with SMTP id s12-20020a819b0c000000b002f4c5227d3cmr10719893ywg.316.1653059288103; Fri, 20 May 2022 08:08:08 -0700 (PDT) MIME-Version: 1.0 References: <286a1eef-e857-a31f-839b-00a4c835dfa9@roeck-us.net> In-Reply-To: <286a1eef-e857-a31f-839b-00a4c835dfa9@roeck-us.net> From: Geert Uytterhoeven Date: Fri, 20 May 2022 17:07:56 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] m68k: atari: Make Atari ROM port I/O write macros return void To: Guenter Roeck Cc: linux-m68k , Linux Kernel Mailing List , kernel test robot Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT 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 Günter, On Fri, May 20, 2022 at 4:52 PM Guenter Roeck wrote: > 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 Thanks! > > 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 knew about the syntax, but didn't realize immediately why it was done that way. Initially I thought it was some relic from the "always cast to void to make it clear you do not care about the return value"-frenzy, which are inside Linux visible mostly in the various "(void)acpi_(...);" calls. AFAIK these are checked by some external tools. In Linux, we have __must_check to annotate the important cases. 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