Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3656166pxb; Mon, 4 Oct 2021 07:01:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2oTLFpz+ksYeIs8zpySaJWECWMzQ174kEXv3tJFL/xppNRKFL7e7JBc2UbqWp5xu3WA9T X-Received: by 2002:a05:6402:5245:: with SMTP id t5mr14936803edd.329.1633356095334; Mon, 04 Oct 2021 07:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633356095; cv=none; d=google.com; s=arc-20160816; b=wAzKxiFF0iU7KJGffduU8J8EdBMLJ8nuY2zpJRJcRBuV/tDO7KsMOHLgVizz++zM06 hM2+LHAmEZoDSO4Z/gL8PwK8NJCwJxa+oNL/Tc6lhdF+kdXHBsF56ftWW+H/Betl1KZH erwi6eLTprkQiJJ6S611ZW/xB5n3zkCZxkZW5Z2zi46jno+/Im0XX4j/onBKThB6CXvJ xkJ/gDnrvgH2y0vR2NBZbmPBv1EVhHT1SqYYH8Hh6gA7N2WYHoXfGNcr/lGAS2n1Ahw7 dpq57VNp/EuIU7vQV8sZhg3GLLLjh7SXEGhldVaphh9bQvZrpJeNkSf+kOiTESXvylRF vv5A== 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=FR6K5YUYcCv1FDH4y5DK0PhIoCQEDWlRf94cnPNCwds=; b=dnnJ4Jh713ZeDY6yx/fyW9GDkWS0IFOYCBGQsPIDJD8ffHGVQAzfWZUkrDo1rg+GaJ zco+JCmSKuuKYmddqP6HV7PRJmE4/6h80LBmGPpJPqVr5kJAghUs+nO7F5DAhTz6zoWn xJT6i3jhdQgwuH0b8oeC5hUXHSACwZJtDhKGfhV0s41BaW9OG4m7HnuyewewxKKzAxrc gXaBR1njvyiVcDLtkqwwUihQ5wkwzJF1m/wHQ8aG0X0Wp5B640rm5YC4UK91i4WMVgyR geLqlR/zZOz6gm4tsKEb5HMSZWfgxOPo0EtUk6/qD2Vgf1pTfurcWyyj8HL4WLkw67ti yb8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=m7Cii4O3; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n21si1020836eju.243.2021.10.04.07.00.55; Mon, 04 Oct 2021 07:01:35 -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=@gmail.com header.s=20210112 header.b=m7Cii4O3; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238365AbhJDN6a (ORCPT + 99 others); Mon, 4 Oct 2021 09:58:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238850AbhJDN6S (ORCPT ); Mon, 4 Oct 2021 09:58:18 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18379C04AEDB for ; Mon, 4 Oct 2021 06:53:34 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id m5so1822482pfk.7 for ; Mon, 04 Oct 2021 06:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FR6K5YUYcCv1FDH4y5DK0PhIoCQEDWlRf94cnPNCwds=; b=m7Cii4O3QZLRYFRd30tuRa1ZGW5M1nO9R064AjZksMB9Vx2UcoVaHIPKQCoCpX+ab2 xxE5BgKLDZb0+xhrQH1YgdG4LisEAqX4cNSdHTyaDqk9I1QBxLGXsGie8FtGgeSoFxXn QQiNcRbsZwcNAGpjW/E4nmrU3+Kf7dVizxU5cjmihNXPDWSNuQgiez8sI61FGn0OqBu6 AitsR5SoUvrPwOGHAoWpYb+itJUZr75vuT2EYNrhkM7WfNUHAti/qP//FRdpmFZQHAq2 obH22mG+VGLBeBSn7dGb8kMWwjIIJ6Q3OV/kZw6S/ny0IYyJvSK1lbfR4Sc6UTdmO2EU RJTQ== 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=FR6K5YUYcCv1FDH4y5DK0PhIoCQEDWlRf94cnPNCwds=; b=66MItmG850rDF1TSuX5gla7oPG+iaZRcIgsMfXulxjGZm5RcfS8Oe/Wx5mHwxvjeVH PdT4l0ftJuqNohFPrGgh4ZHUuWk3i2Mkm4d6RT8x8c6txQVZ7SsTEp2QLGZvtgcCdxpo fdk/H0pumsJ1mFUWDXl/5d/GpwePok3tllLQMwI/PE/hUy8twUE5k5jyvX6TR6usaXL5 QzrMBdDGJuzmxBSUK649wDcytLaLdZYegIuE4LLLkyZoffMorF1EurLTbz9EoEb1lFrg sQD24hWeRKG/amCaptz5EFZvNMbw9YbQbMgxgHjYDqPXiH9cAibWgLruIjW1yli96lHf GZoQ== X-Gm-Message-State: AOAM533EEHZ3rw5PmfCsjTj3Zn+lWqM/e4wIta2sw6BMfn3KxHbVWys3 ppM/EFAUzpWAKIGt+nFo/mI= X-Received: by 2002:aa7:8bd4:0:b0:44b:1f60:497 with SMTP id s20-20020aa78bd4000000b0044b1f600497mr24979664pfd.78.1633355613620; Mon, 04 Oct 2021 06:53:33 -0700 (PDT) Received: from localhost.localdomain ([2406:7400:63:e8f0:c2a7:3579:5fe8:31d9]) by smtp.gmail.com with ESMTPSA id k17sm12209548pfu.82.2021.10.04.06.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 06:53:33 -0700 (PDT) From: Naveen Naidu To: bhelgaas@google.com, ruscur@russell.cc, oohall@gmail.com Cc: Naveen Naidu , linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/8] PCI: Cleanup struct aer_err_info Date: Mon, 4 Oct 2021 19:22:37 +0530 Message-Id: <247efb0e4168393f4aee5e267a9aa8b3a8adff0f.1633353468.git.naveennaidu479@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The id, status and the mask fields of the struct aer_err_info comes directly from the registers, hence their sizes should be explicit. The length of these registers are: - id: 16 bits - Represents the Error Source Requester ID - status: 32 bits - COR/UNCOR Error Status - mask: 32 bits - COR/UNCOR Error Mask Since the length of the above registers are even, use u16 and u32 to represent their values. Also remove the __pad fields. "pahole" was run on the modified struct aer_err_info and the size remains unchanged. Signed-off-by: Naveen Naidu --- drivers/pci/pci.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 1cce56c2aea0..9be7a966fda7 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -427,18 +427,16 @@ struct aer_err_info { struct pci_dev *dev[AER_MAX_MULTI_ERR_DEVICES]; int error_dev_num; - unsigned int id:16; + u16 id; unsigned int severity:2; /* 0:NONFATAL | 1:FATAL | 2:COR */ - unsigned int __pad1:5; unsigned int multi_error_valid:1; unsigned int first_error:5; - unsigned int __pad2:2; unsigned int tlp_header_valid:1; - unsigned int status; /* COR/UNCOR Error Status */ - unsigned int mask; /* COR/UNCOR Error Mask */ + u32 status; /* COR/UNCOR Error Status */ + u32 mask; /* COR/UNCOR Error Mask */ struct aer_header_log_regs tlp; /* TLP Header */ }; -- 2.25.1