Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3298245lfo; Mon, 23 May 2022 01:02:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGiKKpQfN+dny8QEVTDqSHEoJCC+Yb+aKmhaZZdqysQrX5JDeUURX4LhbcFRSuIABP/IIb X-Received: by 2002:a17:902:c411:b0:161:929f:b0d1 with SMTP id k17-20020a170902c41100b00161929fb0d1mr22090584plk.3.1653292958083; Mon, 23 May 2022 01:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653292958; cv=none; d=google.com; s=arc-20160816; b=XRinZ884yX4Feuw6AuQz0XoAR0+BxyAzRtNMWUtT9IpiDwIFqqCOnOUwE9ezt6gPP1 ifVi/XP2EqkZXKP5sUAfbqTq5c9tGiLsWrStQYg4JU7wgMTFgJJxHj4Ir/OU2KrHngLI M85F7JTu1S5gGQqVQ3YBADyaujaOIMSpz4OKZSGxt0smyWHPxGfA1La9O3uAsMkGW6Lv dxNhmFUe/fF7z6ouGfQ8Thd5jRrPVu7cM2UPZdcaDbCEMLl/UbvFEsoE838dkOBeWlnk +xjLiyq6gn1NDJLApm5/ouCvAT28NliJWnr0gBzzJFDJ8CuvjbFKoNTcjUcz8pmjgvhN 8RRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=doVlcQ6Xlwn2BqCTeY/iG09ipnCZzy9t3u/uMA+1XFU=; b=zrvUjJJPuxHnUvyDLhfiFCaflws67X1gjcLjeXB4Md5kFQlA6nD3zjHa+UGoXxYX0t izoxJGLUEbMcJPuPhe6h7W++RJ4JRNc5MJBXvK+XhHzfaOxT6sGmTu20NoJljIeQjagm DGlvHC3O7p3Iga+xIkuedymFgLMGepzP+/dJ7uIONbYWz4iu557CIO02ZSOrZ3rLBmbY ZW3/04pFH2uR0dsYJWb0lUDudk4tauejbhhVOR6gdKlsOawx5vvNNvsrdh9hnisEY5Ix q3bucjw84fdJvF3CPAnlga0OqV9tTuL4GQMj1ZnxU6QrkEoZEdQw97briZmL7v6Wd3Ot wnWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rXoH1vIl; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m7-20020a056a00080700b0051826918034si14436494pfk.1.2022.05.23.01.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:02:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rXoH1vIl; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8193E34D854; Mon, 23 May 2022 00:02:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348370AbiEVAdR (ORCPT + 99 others); Sat, 21 May 2022 20:33:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348180AbiEVAcj (ORCPT ); Sat, 21 May 2022 20:32:39 -0400 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6C0A40A26 for ; Sat, 21 May 2022 17:32:35 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id q203so12180802iod.0 for ; Sat, 21 May 2022 17:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=doVlcQ6Xlwn2BqCTeY/iG09ipnCZzy9t3u/uMA+1XFU=; b=rXoH1vIlolKTcPa7XyPoQrChIH0W6X5hmQjuJx0KajKXf88oC9gsolgD1vM/3SDwtO KXp+4BffG/nUhOQ7WUIjHGwgqxKMIPaG7CqYHCWPtxHWZZMTtESo4MyAvC5Q0MN4Bw8W BpuFXH+vpHdAxYC3GXEbEzaCEPfOscQuRN0Q3PGWONxd0Xvd/lpeK3uxlLK05NQJkgRE Q32LKVwDrXeFkAaVbL+y258ggOHaOSkbqf+uy6VDWksjVVy4Hv0ywnW4NXrWOIEWyUi1 vczwXnuDN43CPTg++j/C9QPxBQxI45ixSnGD/1UIzmK/qd+mFQmaDxKwMymOURD3iutk bZ/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=doVlcQ6Xlwn2BqCTeY/iG09ipnCZzy9t3u/uMA+1XFU=; b=SpGA3qcv+gujswvHMCHNwulnPsMKZqaTqLhPf2v4XhEBJQxejGP679wa/wDuNJExMY uDHjUI+qDDuGRwEiAPv74TnOVeywXEhsogwjKgIho2SH2L47gKHtY3PwoKN0QA3aAUwm g1d3R6U1qYBAlskBwaT0mesKk5Snkz6c1ZpV6/ZwKuK6OQ6dZFlc6uSLHV0rTuX9V2dO hY3c9CvYsaz22iDfoTqQPmBYTLF7BQYNqH5vAZTjyThlfYiLf9LS1J1MJ14GmZeqdjSn 30z3kabn46kKXPn43bZ2GbgF5JS11yO5vTBtoTd4rVTUbRr/PH5R1iiAsxe0lFT5ltM3 fncQ== X-Gm-Message-State: AOAM532k5ueEpUvoiD+cPdEewpAaloGM2BJrOAQzBMmErEmduzbVVzk+ xFtllnPkk6Ye4PhnAzymlLShMA== X-Received: by 2002:a05:6638:34a4:b0:32b:b205:ca82 with SMTP id t36-20020a05663834a400b0032bb205ca82mr8167007jal.165.1653179555689; Sat, 21 May 2022 17:32:35 -0700 (PDT) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id g8-20020a02c548000000b0032b5e78bfcbsm1757115jaj.135.2022.05.21.17.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 May 2022 17:32:35 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: mka@chromium.org, evgreen@chromium.org, bjorn.andersson@linaro.org, quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com, quic_jponduru@quicinc.com, quic_subashab@quicinc.com, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 9/9] net: ipa: use data space for command opcodes Date: Sat, 21 May 2022 19:32:23 -0500 Message-Id: <20220522003223.1123705-10-elder@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220522003223.1123705-1-elder@linaro.org> References: <20220522003223.1123705-1-elder@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 The 64-bit data field in a transaction is not used for commands. And the opcode array is *only* used for commands. They're (currently) the same size; save a little space in the transaction structure by enclosing the two fields in a union. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi_trans.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/gsi_trans.h b/drivers/net/ipa/gsi_trans.h index 99ce2cba0dc3c..020c3b32de1d7 100644 --- a/drivers/net/ipa/gsi_trans.h +++ b/drivers/net/ipa/gsi_trans.h @@ -60,8 +60,10 @@ struct gsi_trans { u8 used; /* # entries used in sgl[] */ u32 len; /* total # bytes across sgl[] */ - void *data; - u8 cmd_opcode[IPA_COMMAND_TRANS_TRE_MAX]; + union { + void *data; + u8 cmd_opcode[IPA_COMMAND_TRANS_TRE_MAX]; + }; struct scatterlist *sgl; enum dma_data_direction direction; -- 2.32.0