Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2546079imm; Mon, 10 Sep 2018 02:53:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdarmM2+QmN2Qg3rebnnPnRIBiF/IdfgwGC1jNAt24ISC+kHrwMlja+knYfO2ksRKZHu4Is4 X-Received: by 2002:a63:c046:: with SMTP id z6-v6mr21891135pgi.114.1536573216114; Mon, 10 Sep 2018 02:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536573216; cv=none; d=google.com; s=arc-20160816; b=tet+Qsk8Vdr57FFpIGrVyR5gFn+yl1ZrDO6fET3uyn4DFcoEKC+/e8lLul51CsrJRU JKVYgJGxBLTiqQhDU7IvbjMNOejFeEA/nkxtm1Gatxmjz8p+R/te0/+IHyXWqIlJUrxN 8sUdbKS35uxHoxniHJNcKeY8ZTUPu0AuHF3SxAzUYUvA/uYPdG+Nuys+qAv/+36P7daX lN7+FeBqh9gpVWmUcvXSxwI9qy0D/Q9M9LjPKh5dA4Tk1R2Vr9W68u/aZyzX+5/IueoI 0EUw+1b2i5egnVhSG4LI21F9kxY3uW3LOo7T0xGybKdZpZR5eFt1msUrli72LlYaM7UY lcjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BCJL1EM9b65YVPh0O0g/U1xG334I0TWVZr6QsZEUaOk=; b=PvBa86R8cxKta3PB2K2KBcfpifn8i7CsWSMRoNiWe8SSDTRAlHoi0KT6Y4tFHCT16U O4AhgyngOtgjb3kpo+QaKPwh0GMP35z+tgbgcUE8nQ6lzBmGoch2ZTsris/EwnT/cWzR S5/T8yDFCwwbdKpQu+5Ek5BFXCr/tyH2cok4bTWiJqriwIurX+0/ME242NuJeYr62IV9 14vD+JgvkQ5XPIAjhQp2qBq9wOdTulMFfRQM35qy8Ovna0sRzNDs4L4R7GBuAmS2h3Zx DDhrF0iL06Kmr6vxx0+FzGHBk8hgAsQK9KgkfQJAWu1HFuuNPS715/vvg2vYLR3wn6KE 08ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10-v6si18057827pgl.554.2018.09.10.02.53.21; Mon, 10 Sep 2018 02:53:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728176AbeIJOp1 (ORCPT + 99 others); Mon, 10 Sep 2018 10:45:27 -0400 Received: from mga05.intel.com ([192.55.52.43]:28206 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728063AbeIJOp1 (ORCPT ); Mon, 10 Sep 2018 10:45:27 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2018 02:52:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,355,1531810800"; d="scan'208";a="87441673" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga004.fm.intel.com with SMTP; 10 Sep 2018 02:52:10 -0700 Received: by lahna (sSMTP sendmail emulation); Mon, 10 Sep 2018 12:52:10 +0300 Date: Mon, 10 Sep 2018 12:52:09 +0300 From: Mika Westerberg To: Lukas Wunner Cc: Andreas Noever , Michael Jamet , Yehezkel Bernat , Stephen Hemminger , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] thunderbolt: Obtain PCI slot number from DROM Message-ID: <20180910095209.GK14465@lahna.fi.intel.com> References: <756f7148bc106d80d2e43273edd6dc8c48c1b87b.1536517047.git.lukas@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <756f7148bc106d80d2e43273edd6dc8c48c1b87b.1536517047.git.lukas@wunner.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 09, 2018 at 11:42:01PM +0200, Lukas Wunner wrote: > +struct tb_drom_entry_pci { > + /* BYTES 0-1 */ > + struct tb_drom_entry_header header; > + /* BYTE 2 */ > + u8 unknown:5; > + u8 slot:3; > + /* BYTES 3-10 are only present on PCIe upstream ports */ > +} __packed; No need for __packed unless you absolutely are certain the compiler does not do the right thing. When I submitted the network driver, David Miller explained this to me and I ended up dropping those. Also use of bitfields is something we should avoid when touching hardware/firmware records because compiler here can do all sorts of tricks. I know the driver is currently using quite many of them but I think it is good for the new code not to include them anymore.