Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7716815rdb; Thu, 4 Jan 2024 05:43:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsYOnF4uGn9E5y+dI/IYTIuPwFmem/LJDBPCHyOxHOwraC/Ox6mUQ8k551doOBrI/mt/u/ X-Received: by 2002:a05:6358:91d:b0:173:83e9:fa17 with SMTP id r29-20020a056358091d00b0017383e9fa17mr646017rwi.58.1704375821679; Thu, 04 Jan 2024 05:43:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704375821; cv=pass; d=google.com; s=arc-20160816; b=MZBUslLukEVCiKqCsR96rfWQbK3JVQa06FI1piN++fUmhumo2gv7IbfwzkRqsgU1vt ++f/8CvVLyjdMUPutE81gk/tdWSKbndtARcBWvO4gNX3y6uUAMsNcnkg+zXGV4W6RUIB VYC4X1as61QC8tW6yg4FacBINZdyEGzPMHO6+FBNqKj8LasT9SyqHd1tbPjcU4kD+aJu ll+EwuaKGUf3La4DJtPBhKw1H30pDk1HRDhDP9h3ozzNhLYiwvwU1gslA5RAFjfnj4lb h3N0ZxiYqpNXDCohgoQjNC/jJ+QKK6Wp3yN8K7ZA/bFaPPQQncF2xO5S55qS3nFjLL8O 4aiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :in-reply-to:content-disposition:references:message-id:subject:cc:to :from:date:dkim-signature; bh=B2eaFHQ70lU8AKmYZJzEro0RtOux318vRyRxAP1gJOk=; fh=6g8HGADHvP3YboDOQicY2YFGfnAFzZJgpCKdcyuSMIY=; b=oJjv1vLlgf/qzdkozFD5g2no2ROAYduNqOEHI3uVtAx1uojewgo9E3KNkOh42M6vE3 vXAktCkJKF640Ga6hOzuChJk3y1HGN44uIPTm6rGs/7l+YFR+qQQ1gJl2A5XeLT+oJSE m3fcKhRgHumeHCS/eJpHc7wey4H856pqY5UnwWtY+eLPB610TiZXn0EBi24N/l5+mF8l +KCD8vjuo+k9IvMHeg2wPOK9GQHW4E9w7ig1Ne6jJQx/xC5HOQ0dn+0GeP5ynJcNoush uhgf1DOTn6kIbAXr5FAOKFNfdn2y92xwcjtV8GgeHpiyMfHJJ35eE5Q0IzsctCt9G6lq 24Rw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=GV10Xjne; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-16714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16714-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ld15-20020a056a004f8f00b006da16e99959si12560586pfb.100.2024.01.04.05.43.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:43:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=GV10Xjne; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-16714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16714-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7240CB21452 for ; Thu, 4 Jan 2024 13:43:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27BB222339; Thu, 4 Jan 2024 13:43:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="GV10Xjne" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EEA72232E; Thu, 4 Jan 2024 13:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l/4mI0obpgPCfUyjCrCeTFAW8FIA9VTy7QFtFXYluMZ/iLrSOiPZg0WEvGRuRzHtzBT+NX+jEzRmy/U2hp+iHvYQlqXJpWwRWC/8Ml0lvmewNirj9Bew9hdEkTOJZcCvOvooXqXSgGKjWTZMt+9iPE9N8QUkJFv7Ay19Gw8umzJTIVgvCWidgRPdNM+xm2Rpv7HiUcNUIYD9VsrlrHt2q2MAgL2E2vQj4YMgixOE3so0nzczvvbmd01Mra55lAKhNs+ERnFgUt8OvrLTQupNyrLdJyFBrz1M3yZHNourktiLm+cAQ9rTeGfwVo9ZVRK2qNsoiE2BQttvzH9B+9tkMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=B2eaFHQ70lU8AKmYZJzEro0RtOux318vRyRxAP1gJOk=; b=mHD8Yolp8vtMqpBI21sr/drgcwTZLpEev4mI0C4gCRAEsJrC8JcQO/Hc5FlfBcWvdwZ6nA1xRz26E7jKognsUmcbe+CTnBwoL0nZllrQ6uJHEdZ7d7ofTNxHvNj7EYAVqQfVSrlfsF6dJUhTGOa3YU4YRrmbYib72b+rsIB/+LaZZ8tZiDoyOrepCzUzAGc5jI8Zw4Q6VqdIHujRvFSSCuQzDceBoQyR/SpxdrqRz3azmLO8LhWqowVlVOYb/p64GgagNmCYzOVSHhmHZjF+p8V8Evgxffqggj9DhK4yyOrDCzEfPjwNGhHIG1cWHZah1LeVGP0/Lo/jpqPLn34Fbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B2eaFHQ70lU8AKmYZJzEro0RtOux318vRyRxAP1gJOk=; b=GV10XjneFoKiNu3AeYGwB11fjdCuapb98fe7cgPtn44WBc0tyHrtExoRpB9ZweWzdukTv0uotmSv+mejUFnMGC5sSt3CYxwkhwkcvOVfrSxKugb+SmSjScGKh3nU4OB2NJkctnVGQi5TWe6cuMzcv07h7Qta3eXHrLO0aBYliXY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB3657.namprd12.prod.outlook.com (2603:10b6:5:149::18) by MW4PR12MB7360.namprd12.prod.outlook.com (2603:10b6:303:22b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.15; Thu, 4 Jan 2024 13:43:29 +0000 Received: from DM6PR12MB3657.namprd12.prod.outlook.com ([fe80::5786:22a:27df:9a70]) by DM6PR12MB3657.namprd12.prod.outlook.com ([fe80::5786:22a:27df:9a70%7]) with mapi id 15.20.7159.013; Thu, 4 Jan 2024 13:43:29 +0000 Date: Thu, 4 Jan 2024 14:43:23 +0100 From: Robert Richter To: Dan Williams Cc: Ira Weiny , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Fan Ni , Lukas Wunner Subject: Re: [PATCH] cxl/pci: Get rid of pointer arithmetic reading CDAT table Message-ID: References: <20231116-fix-cdat-devm-free-v1-1-b148b40707d7@intel.com> <657bd741d2961_269bd294d@dwillia2-mobl3.amr.corp.intel.com.notmuch> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <657bd741d2961_269bd294d@dwillia2-mobl3.amr.corp.intel.com.notmuch> X-ClientProxiedBy: FR5P281CA0016.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f1::14) To DM6PR12MB3657.namprd12.prod.outlook.com (2603:10b6:5:149::18) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB3657:EE_|MW4PR12MB7360:EE_ X-MS-Office365-Filtering-Correlation-Id: 49de766a-83c3-4171-39de-08dc0d2b227e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C8alWrvibIMM6wgXeClth5z5CBVxSEOfsnF1Nx7Vze6BYqfE8Y62fyuZYkAtGJn00RkgqOp2NA6qP6IrNdX2nnDh/jOWMXNZqtpQlCHz7TOyN+828U7irfrqRHquZ668L8vXMBS9gL7i1A52yr76v3xyl87bCIfD3lct95PeEWmUO5LZVTaLRoAziaiBjzv6h9aYqMzrXtyLtEEL3ccvFuhY56a5ufHkqUu5XLd0NtI9UMPH9qbll4SIjfXA0QZCCR/M/W0k9xPJM+dbL0u9ZGcUOQ4Qswd2IzXB2uBiTAPgORqevL+GSRXU24KjcPA2avDl+doaXnx2z/j8PU1SFmJWZkqBuJ4BPSQGb4NUlwVasFh95N1ZgO7u0HhUUgjW2vRR5DIYVZvIacFguIMvgUxOtfqH/0/DGxl206CgeXZ7H8zHY3i7L6mqZEuSutzw+H4SdBpQZ//o1uOXe+t7KV34VBW29nsg5mLdXv5wLkYe69NqA2MQWmQ1ZxHL7UqkCtrd9WRUqMyhHLLwBxuuIS5FYli7wjhibzZP3MtkDS8SkjlgZsnVCciRoSJ9Eh1uJHejXhzVwDqEdA1NraUdEFgA3xt9VjYjhC4azdBrXTvnHqsI5eLMlKqZNSVYdc9ay3ijn7ruMY3jNb8fdMvEjg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB3657.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(1800799012)(186009)(451199024)(64100799003)(316002)(54906003)(66556008)(6916009)(66946007)(66476007)(8676002)(4326008)(8936002)(53546011)(9686003)(6512007)(6506007)(6666004)(6486002)(478600001)(41300700001)(2906002)(5660300002)(4744005)(7416002)(38100700002)(26005)(83380400001)(26583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?OYIMF377hacjKLsdaPsRmFDVFp7ljWrVnkIAp721gbxzHdbUhbXGB2WpAN8K?= =?us-ascii?Q?y/f4+5x9OjebU+SH1URv5WLm0j3W/6aW61rNeqzaFbopx7vjt+qh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yWqjYYtSu/eJAXLVhKFkKDs22YwV?= =?us-ascii?Q?VlazFO75ExCggdDKuWLr6fuNoUnTHOy5u0Tvx4B5SbJ6utovumFyM9Cp7YCL?= =?us-ascii?Q?DDkE5JcHXTz8+H13G6Fxg33qmmJacTqBdC03mml1EgyQFjqhfCJ/ypr61zVg?= =?us-ascii?Q?hJgjW37Zo8V/3Q8M1w5DyCh+qSzcxq5oMH6spCf9I7+Ard4UPgZCplii1YKn?= =?us-ascii?Q?4X5x84B2eHOoW87ZS4SiW4MFc4bhr9yFRtnmYpOn4oPEpIHY1UO2IfkhjaXb?= =?us-ascii?Q?BtvYshzkMC9T6+TVsywJY4UD8BEOG+fhgyief8gYM1k4ifhvyp2XpWs72Gzw?= =?us-ascii?Q?eYwESHeabxjvqkV6q+Hr/LGU0uojbhH9o7nAxyIBfxcVrrrsNLw1XIkV732d?= =?us-ascii?Q?DiYOfH0Ba0u5JpVTgG/QXPiqBiRlAA5GRhtl/zPOpJ1xk2nRkmBw89SJw2E/?= =?us-ascii?Q?ZSw+vb6BwpXnxLM4lyvX2IqwtHN6fnkemZR8D7fFWFTqoLQx4eY/i3/CPtzt?= =?us-ascii?Q?Iixa+/j9aQoFwwPDMSZ/oihBhx8Smx0e+tHPt/AQHG4VnzIfiaGud6/XGQt2?= =?us-ascii?Q?OY9NAnpLp5qBg6/VzHRpXfRlkPcUVgBsWB9R5NTN?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49de766a-83c3-4171-39de-08dc0d2b227e X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3657.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2024 13:43:29.4749 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8xPbcvwf8SIZmF40hKQwAOVvneGYI9BHLKUERky7FF8bqfdZJN3/mVjDi68ltdUcfM9RtaiElB6Bs5+35S7Vbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7360 On 14.12.23 20:34:09, Dan Williams wrote: > struct cdat_response { > __le32 doe_header; > union { > struct cdat_header header; > struct cdat_entry_header entry; > u8 table[]; > }; > } __packed; > > As far as I can see nothing outside of drivers/cxl/core/pci.c needs > 'struct cdat_response', so it can stay local to this C file. I moved that close to cdat_header and cdat_entry_header which is also defined in cxlpci.h but only used in core/pci.c. I would like to keep them together but we could move that completely into pci.c in a separate patch? Thanks, -Robert