Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2353439rwd; Fri, 19 May 2023 04:47:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GGVMToWu/d9kPrK8m2zhrjvCplYHPNWSNjp1o7cT8UlJxZvTT3c/0RksJbGIhn7oKQ6u5 X-Received: by 2002:a17:903:1108:b0:1ad:be4d:5dfe with SMTP id n8-20020a170903110800b001adbe4d5dfemr2754131plh.27.1684496850950; Fri, 19 May 2023 04:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684496850; cv=none; d=google.com; s=arc-20160816; b=npgjWPoLX3seFika29mLpsW/s0QqmbWRJDwb+ueZHP3kyupn496PfZoyI0iCvAV9/e 45HWJMV1tOwPdl02L66f5ucEqHXjtlRD6KCFc6ErwW0f/AMIGmkXjKwdvXAHYY+kJ0pP waNQrtcnSOINGz66QTAFt/BZJslJd1Np2mMjArDHohN9maUNRlJJtPHmkPgErHsRmUlq 0uVL8gAqmafDLJrSA1YsESkIkWbQQRoY+/8Zwx/gVtIwVXwHnI9pmjn+NabxvzwMQ2Xi x3pzYoKk6MZO2ziyy2L0QGD+To13mqVHNTm/j10+QDCx0rhtczCj0jM8R/NKv715arz4 jqsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=uNpG4gjpCXHdo3D0L39TwPPZhKinrzb1DV6Gj5Klpwo=; b=fA6L8nsnziG0WlGhVoM3pSg+Yl787t9hlyxBL8SjVX3WT/mjNzJNox7eXZLyjVeYye oaRyMHc/fDuCy2oPdrk8FDBq0kmsZt0FK4VzsqKNF6632Ki9NDCf8jmrogBjbiJbFrSa drhXY9XNLtxHzLFFDTVQxLOuTT/dhuh3aDnUWbbgn38OcASoWr4CYCZVbd8ubuKuJZpO I3OEWThG6rw0KVhi1nfVMMI4tZt+W4YjDYWer+7SxFOfD5lSGI329kZdqJEi4hBFYTeR xukcrv9wutpQUHFQw5hL7641cf7FlwPrIFqhxkN40c1S9+8kEGlkdZ1yH6zQwxLvahLn PtPg== 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 jb12-20020a170903258c00b001a63889512csi3426324plb.135.2023.05.19.04.47.14; Fri, 19 May 2023 04:47:30 -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 S231579AbjESLY2 (ORCPT + 99 others); Fri, 19 May 2023 07:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbjESLYZ (ORCPT ); Fri, 19 May 2023 07:24:25 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A16F11B7; Fri, 19 May 2023 04:24:18 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id CAE0892009E; Fri, 19 May 2023 13:24:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id C3C2892009B; Fri, 19 May 2023 12:24:17 +0100 (BST) Date: Fri, 19 May 2023 12:24:17 +0100 (BST) From: "Maciej W. Rozycki" To: Christophe JAILLET cc: Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 2/2] x86/PCI: Slightly simplify pirq_convert_irt_table() In-Reply-To: <84bf047b01452a72642dbe355b02ef016c985a91.1683356951.git.christophe.jaillet@wanadoo.fr> Message-ID: References: <84bf047b01452a72642dbe355b02ef016c985a91.1683356951.git.christophe.jaillet@wanadoo.fr> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Sat, 6 May 2023, Christophe JAILLET wrote: > 'size' if computed twice. *ir and *it being the same, the result is the > same as well. There is no `it' data object in this function; I presume you meant `rt'. Then `*ir' and `*rt' are of a different type each, hence the calculations are not the same. If they were the same, the function wouldn't be needed at all in the first place. Therefore, NAK. > While at it, also use struct_size() which is less verbose, more robust and > more informative. This might be a valuable clean-up, thank you, please submit separately. Maciej