Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3911200ybc; Thu, 21 Nov 2019 16:07:15 -0800 (PST) X-Google-Smtp-Source: APXvYqyBunCR2sUD/bubEd9aYtMjfEIqF3dhETI6+fjdMPXQAy0tvOWiwXzREW+0hYEhNADpRSlj X-Received: by 2002:a17:906:d96c:: with SMTP id rp12mr17872968ejb.253.1574381235288; Thu, 21 Nov 2019 16:07:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574381235; cv=none; d=google.com; s=arc-20160816; b=BnSXNBnZ5WzjfotAkBzyXBx1TPGn/Vn24yV/zoJhsD/0OAwh0Kx3DtJJlUI2z+0jnE r/sInKQAYDNe6/V1VLUsbwJgU+9+PeVJDvSovhPlyQwHLm3Ga89YdCxSdujde3yw9g8M P70MCCmoBBF72MoGIgadFTFQVhObAbntcaJyfVN0IELZ8edumYnrBarO3koJs76UuofL CqdiWH4Sx8zmlyxtQZsMwGiyy9pcNrrg4u7qHjLswafQS5hsRDDO+eKL9cg2+779sb7A 9jmNLnZbJNbswGhwVc/XhjO+QqhTgYzsjEM/pAT+Zoj1GKUOkSpjGwNw3uOIu6rB0gcX fs6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fpjzlQz2fMpAHDjP1l/+UaY8JIYWZ9EvltjrvoH1rb8=; b=u080DkOU8QPG82RA/ySnroGHtNUte6vKt/vDri/5/HIGnw1SM607RtHMzcuy0g9s/v VplMd27Bg06EYx/1d/DMVG8n9c9d9M9OdLiVAX6t6AUgqqF4YVMPzRIQIUkQNkWX8XAM qpJYg2OHfs1oZZTWd31PQlQJ2LQWFzaiNfqiMw+qdq9PXMPZEqweOiMyH82nmsfU5R6b /lWNIYRvlbnW76xPer5kAhHQtHS8XVN7diT7nj+YZaMQs1jq9KTZiVGRac/PkdL+G63N NO23ts/EFWryTDokp/z3cj9z/us11KZkQZkGK60zbFhVNw9JBiimzXfSGIHyzxMmkIPx wYhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MsxvqvFN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20si2989311ejr.168.2019.11.21.16.06.47; Thu, 21 Nov 2019 16:07:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MsxvqvFN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726554AbfKVAFT (ORCPT + 99 others); Thu, 21 Nov 2019 19:05:19 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45546 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfKVAFT (ORCPT ); Thu, 21 Nov 2019 19:05:19 -0500 Received: by mail-lj1-f196.google.com with SMTP id n21so5198398ljg.12 for ; Thu, 21 Nov 2019 16:05:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fpjzlQz2fMpAHDjP1l/+UaY8JIYWZ9EvltjrvoH1rb8=; b=MsxvqvFNl+4QDyZ13r6+5C2c7UUENK3f0XIzfYj8rl4l9ErTmGnoIokoX2t9ycbhDd dURXH1TKtvtnuBCRkQJoYpEABlDfiL5pSGHhZA/F2gkmZtLQQLl467dc7CkWRkXveqZ4 KGQaZSAe6hmaqEPsRDmZ66IrONQOmcHs1okqI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fpjzlQz2fMpAHDjP1l/+UaY8JIYWZ9EvltjrvoH1rb8=; b=cKRb+W5DuZKK3FfjQJYkJu7wN7ZpFBWLR9nWp8/hXYVK2IuceXu1G2OHTzmlhY1eF4 Z3GgDV06TBQC32qytLEUc6Gm73sKOFJjRm0np7780WGcGn8ht4cDYGsod6NK45U/1QgZ pGzidG4C5+ru4SEb67ppuHaC08BeOvE0BXufN6l+/bnFuYHur+xOMlAA9zmU39xyHmbk 28X/xHfg7lJb7+ZNPxLQY6DNlhDFSEdmcBk5rKAUP/gyP97762FvFUkj1h2mixOkI0ui Yy5o35EH17KzAfbIgiW7clYXpLjevSIW0+baFf8r/w/IqwePVguJm5Krp8WlLTuFzfKF nhKA== X-Gm-Message-State: APjAAAW4nEWVSE1MJQrLDgVdoyU5XnKwP5iD3a8FXSTnoXib5lkRwteF D0G1QIYOYDXeCiu0rPuMs8GT3h49xBc= X-Received: by 2002:a2e:974a:: with SMTP id f10mr9993240ljj.25.1574381116821; Thu, 21 Nov 2019 16:05:16 -0800 (PST) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id k19sm2266286ljg.18.2019.11.21.16.05.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Nov 2019 16:05:15 -0800 (PST) Received: by mail-lf1-f53.google.com with SMTP id m30so2226651lfp.8 for ; Thu, 21 Nov 2019 16:05:15 -0800 (PST) X-Received: by 2002:ac2:434f:: with SMTP id o15mr9727805lfl.190.1574381114883; Thu, 21 Nov 2019 16:05:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Thu, 21 Nov 2019 16:04:58 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: can we get rid of the cpumask_t typedef? To: Rasmus Villemoes Cc: LKML , Thomas Gleixner , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 21, 2019 at 12:55 AM Rasmus Villemoes wrote: > > The cpumask_t alias for "struct cpumask" doesn't seem to qualify for the > kernel's requirement for when a typedef is warranted. It's also somewhat > easily confused with cpumask_var_t which has very good reasons for being > a typedef. "struct cpumask" outnumbers "cpumask_t" about 5:2. > > The motivation for this is that kbuild informed me about some driver > that I just enabled for ARM happens to include asm/irq.h, and for magic > reasons no other previous header happens to pull in cpumask.h. So the > build fails > > >> arch/arm/include/asm/irq.h:34:50: error: unknown type name 'cpumask_t' > extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask, Yes. Please just add a forward declaration of 'struct cpumask', and change that cpumask_t to use that instead. I'm not sure we need to remove it entirely (there's a fair number of users), but we can/should deprecate it, and certainly use 'struct cpumask' in function declarations etc so that you don't need to go through some include file hell. Linus