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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FAD2C433F5 for ; Fri, 20 May 2022 12:40:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 04D036B0073; Fri, 20 May 2022 08:40:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F3DFC6B0075; Fri, 20 May 2022 08:40:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E09328D0001; Fri, 20 May 2022 08:40:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D27946B0073 for ; Fri, 20 May 2022 08:40:34 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id A495D61955 for ; Fri, 20 May 2022 12:40:34 +0000 (UTC) X-FDA: 79486079988.05.A0B9674 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by imf05.hostedemail.com (Postfix) with ESMTP id 26F7E1000DD for ; Fri, 20 May 2022 12:40:09 +0000 (UTC) Received: by mail-qt1-f175.google.com with SMTP id hh4so6774989qtb.10 for ; Fri, 20 May 2022 05:40:33 -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=AW3WbgwLSP0WZKYPK3Y6DQ8WAhPkJkHKkMhSdaktb4M=; b=xc06VSL36jN1A/iat9Noq5U7xHUVMfeeYCVBWZYfIAmHzhR4IoFtzRnDLpfAdJ3GWS qdSa4tOMjAEschpNFZAqvAwaciyqS+QjhGkyTdxNKClKxWAUyaqzITc1Tfbu96svpn7x S7j1uwib1Qer9n/TJg2U0HsrXPaEoROY44UpRNmoaTQknZO9P3yaCszq5sgznOWDFuuH mzME6dew932Zjde/wc7/k0fFPULLOrCKA63dVs330aOyidW6UYXjHuH6dp8oMkbRx5v8 kd5fEdwmALQXxncmMzldfZO2/h9wNGOWfJ2J98QWRhdWvXvQXg4CLoFoTOBWR8UKvhet f2RA== X-Gm-Message-State: AOAM531hAG/5ts+3jA8a7DjLxkKD8aptvDIxLuWMUHrHjQGxcEyNm2UH CSf/3Gli/ImFMOk9X4Qy0tAONEUKxrtI+Q== X-Google-Smtp-Source: ABdhPJx1XQDJS6eDYTYfNcWzNA/KhVz1IG+58T9N9vi0zfoFm++5ctGSHsGh9/ei7jUvMpP3wDVN5Q== X-Received: by 2002:a05:622a:493:b0:2f3:e77b:640b with SMTP id p19-20020a05622a049300b002f3e77b640bmr7399589qtx.236.1653050433059; Fri, 20 May 2022 05:40:33 -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 x24-20020ac85398000000b002f3b82571b1sm2991361qtp.1.2022.05.20.05.40.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 May 2022 05:40:32 -0700 (PDT) Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-2ec42eae76bso85527747b3.10 for ; Fri, 20 May 2022 05:40:32 -0700 (PDT) X-Received: by 2002:a81:9b0c:0:b0:2f4:c522:7d3c with SMTP id s12-20020a819b0c000000b002f4c5227d3cmr9969695ywg.316.1653050431948; Fri, 20 May 2022 05:40:31 -0700 (PDT) MIME-Version: 1.0 References: <6285958d.+Z2aDZ4O1Y9eiazd%lkp@intel.com> <0530d502-1291-23f3-64ac-97bd38a26bd4@roeck-us.net> In-Reply-To: <0530d502-1291-23f3-64ac-97bd38a26bd4@roeck-us.net> From: Geert Uytterhoeven Date: Fri, 20 May 2022 14:40:20 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-next:master] BUILD REGRESSION 736ee37e2e8eed7fe48d0a37ee5a709514d478b3 To: Guenter Roeck Cc: kernel test robot , Andrew Morton , linux-staging@lists.linux.dev, "open list:TI ETHERNET SWITCH DRIVER (CPSW)" , linux-nvme@lists.infradead.org, linux-hwmon@vger.kernel.org, Linux Fbdev development list , KVM list , DRI Development , amd-gfx list , Linux Memory Management List , Luc Van Oostenryck , linux-sparse@vger.kernel.org, linux-m68k Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 26F7E1000DD X-Stat-Signature: ubyh5yuzs9jxtabsjduxounkij94m76g Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.160.175 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com X-Rspam-User: X-HE-Tag: 1653050408-946283 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi G=C3=BCnter On Thu, May 19, 2022 at 8:48 AM Guenter Roeck wrote: > On 5/18/22 17:55, kernel test robot wrote: > > tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux= -next.git master > > branch HEAD: 736ee37e2e8eed7fe48d0a37ee5a709514d478b3 Add linux-next s= pecific files for 20220518 > > > > Error/Warning reports: > > > > https://lore.kernel.org/linux-mm/202204291924.vTGZmerI-lkp@intel.com > > https://lore.kernel.org/linux-mm/202205041248.WgCwPcEV-lkp@intel.com > > https://lore.kernel.org/linux-mm/202205122113.uLKzd3SZ-lkp@intel.com > > https://lore.kernel.org/linux-mm/202205172344.3GFeaum1-lkp@intel.com > > https://lore.kernel.org/linux-mm/202205190527.o9wVEvHI-lkp@intel.com > > > > Error/Warning: (recently discovered and may have been fixed) > > > [ .. ] > > drivers/hwmon/nct6775-platform.c:199:9: sparse: unsigned char > > drivers/hwmon/nct6775-platform.c:199:9: sparse: void > > This is getting tiresome. Every driver using outb() on m68k will > experience that "problem". As far as I can see, it is caused by > > #define out_8(addr,b) (void)((*(__force volatile u8 *) (unsigned long)(ad= dr)) =3D (b)) > > in arch/m68k/include/asm/raw_io.h. I have no idea what the > "(void)" is for, The "(void)" makes sure there is no return value. Which matters if the result of a function returning void is propagated to another function returning void. > but removing it "fixes" the problem. This introduces new problems (m68k all{mod,yes}config): In file included from arch/m68k/include/asm/io_mm.h:25, from arch/m68k/include/asm/io.h:8, from include/linux/io.h:13, from include/linux/of_address.h:7, from drivers/gpu/drm/msm/adreno/adreno_gpu.c:13: drivers/gpu/drm/msm/adreno/a6xx_gmu.h: In function =E2=80=98gmu_write_r= scc=E2=80=99: arch/m68k/include/asm/raw_io.h:34:80: error: =E2=80=98return=E2=80=99 w= ith a value, in function returning void [-Werror=3Dreturn-type] 34 | #define out_le32(addr,l) ((*(__force volatile __le32 *) (unsigned long)(addr)) =3D cpu_to_le32(l)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ arch/m68k/include/asm/io_mm.h:397:26: note: in expansion of macro =E2= =80=98out_le32=E2=80=99 397 | #define writel(val,addr) out_le32((addr),(val)) | ^~~~~~~~ drivers/gpu/drm/msm/msm_drv.h:468:32: note: in expansion of macro =E2= =80=98writel=E2=80=99 468 | #define msm_writel(data, addr) writel((data), (addr)) | ^~~~~~ /drivers/gpu/drm/msm/adreno/a6xx_gmu.h:141:9: note: in expansion of macro =E2=80=98msm_writel=E2=80=99 141 | return msm_writel(value, gmu->rscc + (offset << 2)); | ^~~~~~~~~~ In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu.h:11, from drivers/gpu/drm/msm/adreno/adreno_gpu.c:20: drivers/gpu/drm/msm/adreno/a6xx_gmu.h:139:20: note: declared here 139 | static inline void gmu_write_rscc(struct a6xx_gmu *gmu, u32 offset, u32 value) | ^~~~~~~~~~~~~~ These can be fixed using e.g. (there are more in the Adreno driver): static inline void gmu_write(struct a6xx_gmu *gmu, u32 offset, u32 val= ue) { - return msm_writel(value, gmu->mmio + (offset << 2)); + msm_writel(value, gmu->mmio + (offset << 2)); } > Either case, this is not a problem with the nct6775 driver, > nor is it a new problem. Indeed. For the sparse people: The full error is: 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 Basically, sparse doesn't like "a ? b : c", if the return types of b and c don't match, even if the resulting value is not used. E.g. outb() on m68k: #define outb(val, port) (((port) < 1024 && ISA_TYPE =3D=3D ISA_TYPE_ENEC) ? isa_rom_outb((val), (port)) : isa_outb((val), (port))) where isa_rom_outb() leads to rom_out_8() returning u8, while isa_outb() leads to the out_8() that includes the cast to void. So the best solution seems to be to add more "(void)" casts, to e.g. rom_out_8() and friends? 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. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds