Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4829220rwb; Mon, 31 Jul 2023 12:59:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFQ1BShuvqjIlybR4PZqDZ9Zko8TfZug/cO8BtSrJHxMd9Qsrbu58fVxex4EBGXOkzSaiFf X-Received: by 2002:a05:6a00:9a6:b0:687:404f:4d5a with SMTP id u38-20020a056a0009a600b00687404f4d5amr3746903pfg.13.1690833575554; Mon, 31 Jul 2023 12:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690833575; cv=none; d=google.com; s=arc-20160816; b=cUxtyHQOwfInix0A1tVCyB/54zDaE1LCAZZWXFDuAMaYgumHy47mjqDFid72hlQbbM Sax/Jyd3IiQgE2mQNGQ14yyH23jbHhxk7EYKfOeRBM5Gvlj6QlYcgu5HCiYvddn01C8x sVY+4TkpJu+FTU56zwNGnkmD/va9/aiL0KOJcCWDIl9NXBpp5asbdDtrobQOQ+Ni8Q3v N6aX6UYioSRoyOCkDIvjmfD8drePxtk/ogldP+rN/ihis2NEvMz1Urzf/OYquRtjGh2H 8i8LTZsDgmATCd24xBJOJI+F+AAHu+OTsxzjFwcpVaHdRTvSaBZSRJCmhalreq4Ny6AT xAzg== 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:dkim-signature; bh=VbqTPQRqx5r6b8SVskB/TyQ1aJsbLTn8hYnlmIsS2WQ=; fh=/7OkNTBFptE5TPUmABtBPdDz4BLpwnFlxoxMUDGMyAA=; b=LLnGusckWyIqkeooCxaZLuB9n6TDxGvxlyo6LR5Y4lXayUyJwapTaGAdHKDKQ9bJxp iusKOkWxuopTiC2Wfw6OKBtw19ws1iPFNcmkMAp0UbSk7bC+0tktDOZQSNoFgzj/j9ae Dv9X5tGqsT6Fzv0zf2GSJ4UgZKBLlkv4UHF1r/MQIMX+s42nbCZ2TLayMoY33dMNrsmC dAtlwmeDqrD/h18UbXUWbsTNnT/Xnaqz2Ld6tosyxbeKROTS2yefE0rjb4Tmj2+GVThe zxVk3eQv1fXVGg+slkHa6WZoVBaDIOHX9DhNzaXbVl+ipHPvV0TxAPps0aaIoDLPvoHC ffdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Zuy0CCRc; 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 u31-20020a056a00099f00b006872ac0a222si3292086pfg.100.2023.07.31.12.59.23; Mon, 31 Jul 2023 12:59:35 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Zuy0CCRc; 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 S229871AbjGaSkk (ORCPT + 99 others); Mon, 31 Jul 2023 14:40:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231938AbjGaSkZ (ORCPT ); Mon, 31 Jul 2023 14:40:25 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 795DC1BC5 for ; Mon, 31 Jul 2023 11:40:24 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5222c5d71b8so7010978a12.2 for ; Mon, 31 Jul 2023 11:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1690828823; x=1691433623; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VbqTPQRqx5r6b8SVskB/TyQ1aJsbLTn8hYnlmIsS2WQ=; b=Zuy0CCRclkOgd6i0onP3AHjnvLf5Pi/PG33b2RnSaMRaFYgnrijDZynKSRGcGPfFtn 6HGAR5J+8e4+PeBtmkgx/cZ61q/v0PXGPWnIfmIlf8GAFb2KPPI0Ls7ce18qnxqxiFIR 7KILYcWIkQNM6iceCUchGu6R8RHp5jfNYsK6U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690828823; x=1691433623; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VbqTPQRqx5r6b8SVskB/TyQ1aJsbLTn8hYnlmIsS2WQ=; b=i2YTxQkh0ZLsoHSSjijjtbhd/+UasNZ8ldY+6cNN+KKro4lKvrzNdJxZAdsa13Q2Nl G3PajJrLeEE/gqhfaKq8giH7dMqF/ttWrYoom25BeVYHtq5BcETaCNzrZxSAeHWRJth7 pSoI97AswjPXQP9MxsGCfltN3ak2j07Lt+X6QXThz77WEzZDZVOdxf29ZUioRGJ4btse 99tCneLb+Bh260tykNAa3w6qjUHOSlaj01Rjlpx8BWastTpoA72z+o2Asae+MayTYq/i aul9yDhM/FTnfpYTweBIqwN4ROSa2SMXHR2RHAHgWnkS/s3zVLvRKaAZd330XS6sFHTP HfAA== X-Gm-Message-State: ABy/qLYsgyjkYrqOBs674kvabVN5a5sipHGsOWhm5MP/sMdwxn6GhzH3 l3pTHOFkAxer9trioQfWahknHoznM+FWLk+cMbw9DDR2 X-Received: by 2002:aa7:db49:0:b0:522:38f9:e653 with SMTP id n9-20020aa7db49000000b0052238f9e653mr586908edt.30.1690828822848; Mon, 31 Jul 2023 11:40:22 -0700 (PDT) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com. [209.85.208.42]) by smtp.gmail.com with ESMTPSA id u19-20020a056402111300b0050bc4600d38sm5765400edv.79.2023.07.31.11.40.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jul 2023 11:40:22 -0700 (PDT) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5221b90f763so7027425a12.0 for ; Mon, 31 Jul 2023 11:40:21 -0700 (PDT) X-Received: by 2002:aa7:d7d1:0:b0:51e:25af:dc59 with SMTP id e17-20020aa7d7d1000000b0051e25afdc59mr532272eds.40.1690828821624; Mon, 31 Jul 2023 11:40:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 31 Jul 2023 11:40:04 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: arm32 build warnings in workqueue.c To: Petr Mladek Cc: Tejun Heo , Dave Airlie , Arnd Bergmann , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,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 On Mon, 31 Jul 2023 at 01:20, Petr Mladek wrote: > > Would it help to use const variables? I guess it would _work_ these days (I think modern C has picked up what C++ idiom of "const variable with an initializer is a constant"), although with old compilers I would actually not be at all surprised to see 'const variable' uses being turned into "load from memory", But I don't see any real advantage, and it gets very nasty for non-static ones. I think people just need to expand some things manually if they use a debugger. It's not like we don't use macros absolutely EVERYWHERE ELSE, and any gdb user already has to deal with it. The workqueue flags are the least of your problems. So I think the whole "gdb debug info" argument is complete garbage, and was never true at all. If you want gdb to know about these constants, you just do the same thing that gdb users already have to do for other things. We have all those gdb python helper scripts for other kernel magic - some of it *much* deeper magic than a trivial "combine a few constants". And honestly, I don't understand why anybody seriously believes that those WORK_STRUCT constants are somehow very important. We have many *much* more fundamental constants that are #define's. Thinking that WORK_OFFQ_CANCELING needs special gdb understanding when we have PAGE_SIZE that does not seems entirely crazy to me. Linus