Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp812402pxb; Tue, 14 Sep 2021 09:13:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/cn3OO+NrA3l8hDOcP7ZvpiP461AQj30GJ9o8k4iG8B7dFyPaSS486xnCQ9t8//QauyuB X-Received: by 2002:a05:6512:3096:: with SMTP id z22mr13939381lfd.475.1631636003003; Tue, 14 Sep 2021 09:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631636002; cv=none; d=google.com; s=arc-20160816; b=pM2o1yttYQYrFtzIehn+dW33LGSwnjV0wN7XRjcDr+tkavibyus9V4w3Tg9wqvk49L rKSPUbf1gGmaaLeBoRvxMCWrjzvV+1y9sAZ11JSoPSilQIGkcj0sapOtPY39disQb8k0 pKHF3RlgeUNu54Pr5pBlIA9cg3oq1mx9tnezgPNECBdWx+ZjMaO7dUcJWZ7BGLpsPHGk GQW3a8GJtx/AxJRUzpULHbreBRMjflpYdmcWGc1RjGd2QrUpIdfoaojxH1Q9Ty7pKf32 4GDsYnYzG7EuFcgYe/yw32vrVM4aL5ejWss/fUOv7gahVQc4OoX5Aqfyj1PJyAqUujta r5Aw== 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=9fllBj26OeHHT9wDXafJCttnWR/9q+XJykKO+S3yp4o=; b=SU6b7w1vx252VCHlTmZ3DfYxUP2Lk03hZYJxA3tllIxEntstO6QqszCus5iwnI6Fzn RiS41CPGnvj/7AEPy7Y7RFPr0S/xPUGsjuLzOQfvaGWHFEs8wTVhJEd8CnVxxUR1lDH8 inUqYvKxua4u4D+gBM+pgNe4oLm4iIIUXFvxMxQjOKM42fx30rtvdchFeDCYRaxZZjHf EuPyOtrd6miEz2HaQhWtKgeQxcEXteYiOlYvleCh/f1bldwkTavRuJdYOMGyHycthdbe Aa+7UsQLD3WQJlijUYWpMZi7gtRDUOr5VXoObtpZk44LIttsQoHTdcknVZv+RaGkDNWF 3EjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IHaez8cp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si1046190lfo.354.2021.09.14.09.12.54; Tue, 14 Sep 2021 09:13:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IHaez8cp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235254AbhINQMF (ORCPT + 99 others); Tue, 14 Sep 2021 12:12:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:59984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235205AbhINQMD (ORCPT ); Tue, 14 Sep 2021 12:12:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1EBE061184; Tue, 14 Sep 2021 16:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631635846; bh=EG2I9oaRHQ+gf10Ljpq+PHD1qpxygSWw9ESK9c5OiTI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IHaez8cpMAtBscPugr8Wcx49J5XMmJfvQ3Mok3kfERhW3dEAPDFubeaLOLLeh9fHG t5pEK4LY2m3b8QwYehsOmmn+zYydXxpWeyI/hxKSpEuhTc8H6OvGtmAE2NhlJGK+g3 i0iqI5O2vxZND4woIXUIws78VJBZv/sXg/SPQRTYh2UPJItg9+zmp6pHD6hfFNF96Q Y+GA5w3hfbEPP7jRxdS+2cqxABnGmRf7UBZxcVh0prTu8fgpFidPfDlongZapwbyW6 vNEe7VR9+LbNh4FHXz4UpdNRgT4H2B3yc0IfMjLEa1EhSNZlHpQwon17Fyxt0NQdXv N32FT/mRdaGnA== Received: by mail-ot1-f49.google.com with SMTP id g66-20020a9d12c8000000b0051aeba607f1so19235288otg.11; Tue, 14 Sep 2021 09:10:45 -0700 (PDT) X-Gm-Message-State: AOAM531KxFi6+kFUJWb+QARtiHxauuDPFE/u7WdbtXJQ8eRK0w+UJ0Ro HjFE8l/cINdLwzfNfGotFHDDvzRpuwshANQ2adw= X-Received: by 2002:a9d:200b:: with SMTP id n11mr15316897ota.30.1631635845243; Tue, 14 Sep 2021 09:10:45 -0700 (PDT) MIME-Version: 1.0 References: <20210914121036.3975026-1-ardb@kernel.org> <20210914121036.3975026-6-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Tue, 14 Sep 2021 18:10:33 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 5/8] sched: move CPU field back into thread_info if THREAD_INFO_IN_TASK=y To: Linus Torvalds Cc: Linux Kernel Mailing List , Keith Packard , Russell King , Catalin Marinas , Will Deacon , Michael Ellerman , Benjamin Herrenschmidt , Christophe Leroy , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra , Kees Cook , Andy Lutomirski , Arnd Bergmann , Linux ARM , linuxppc-dev , linux-riscv , linux-s390 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Sept 2021 at 17:59, Linus Torvalds wrote: > > On Tue, Sep 14, 2021 at 8:53 AM Ard Biesheuvel wrote: > > > > task_cpu() takes a 'const struct task_struct *', whereas > > task_thread_info() takes a 'struct task_struct *'. > > Oh, annoying, but that's easily fixed. Just make that > > static inline struct thread_info *task_thread_info(struct > task_struct *task) .. > > be a simple > > #define task_thread_info(tsk) (&(tsk)->thread_info) > > instead. That actually then matches the !THREAD_INFO_IN_TASK case anyway. > > Make the commit comment be about how that fixes the type problem. > > Because while in many cases inline functions are superior to macros, > it clearly isn't the case in this case. > Works for me.