Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1247777pxv; Fri, 16 Jul 2021 05:14:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQRgu8q5dX4qDgqqb+cVUXHyplLrMNDMukbcfiPOz2kSQ22xC3+2OJSKrRf3qpO5NAIjeE X-Received: by 2002:aa7:c6d4:: with SMTP id b20mr14081070eds.204.1626437671587; Fri, 16 Jul 2021 05:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626437671; cv=none; d=google.com; s=arc-20160816; b=m17lgBt1/CjRHm2Rmxg8NSnmUNFioc2+oVi1jDsHea2fEjY/9ZNBBo990Z5Du+wxrN EfMTZVV74DUG82wyej6Ds4fVxXOa3VTc6IAOXSq/ijx3YsJdGr4vx3hozufvXVd/812b QCWGAEThj5lKw3HyJB9+e39ZZqiF1D9EVwFpbBBVFr7UAy/JEg/wWqVo5mDdlq0s9z1J hBi1/361Lh86DgoVQG3yDu7eV2UJK/wgtionFHq663a/IM2PVKLbDOL7gFV/bm59V3SZ ktw2SfjjMDdsjINd1hpDCCNRDgVl2NryUpn6syaSzkZbr4D67e41kn29Q0YcVuwFfskj 6U2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=u4v41GoLZk3LbFuOakdr68NrY8yJ+iPApliGGmS4v2I=; b=j/AgOoVJA+ad+gS/7rFYH1SVd29hMoJZLsGMmLnkiotOyjf3wDwL+9NNjY/hWC44y9 BY969M5IrNkstNt+t82+E7MOi9Jp6HJ2zkvSBIZpADeHRCrp98WfV2R5Tt/f33zfy1WY NhT0JphcZJGGB9adBnaeY1Cj1mSvo1kgWEA6mw29CY9CQS2tw2dyphvtQkSCxCBJoUYM Vv5vQ/nYulEDkdZuvcJ1cTcWCzNpP8x9t01ArmtELgjswgSbJH4i+lmtUhaXht5/lRDG vg7HkHizfwJc/EcQ08T1NVxfgi+DVwbNFRIYZmiZBDv4O9ZmWYKG1qFCIdqYwz29N9tz NwKQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 t12si13628178edc.179.2021.07.16.05.14.06; Fri, 16 Jul 2021 05:14:31 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238543AbhGPMPS (ORCPT + 99 others); Fri, 16 Jul 2021 08:15:18 -0400 Received: from mga02.intel.com ([134.134.136.20]:21005 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238234AbhGPMPP (ORCPT ); Fri, 16 Jul 2021 08:15:15 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10046"; a="197908713" X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="197908713" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2021 05:12:20 -0700 X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="631056040" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2021 05:12:18 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1m4MhP-00EDdj-Lk; Fri, 16 Jul 2021 15:12:11 +0300 Date: Fri, 16 Jul 2021 15:12:11 +0300 From: Andy Shevchenko To: Sakari Ailus Cc: kernel test robot , Nick Desaulniers , clang-built-linux , kbuild-all@lists.01.org, Linux Kernel Mailing List , Thomas Zimmermann , Petr Mladek Subject: Re: drivers/media/v4l2-core/v4l2-ioctl.c:303:28: warning: taking address of packed member 'pixelformat' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value Message-ID: References: <202107150148.RpWnKapX-lkp@intel.com> <20210716114105.GF3@paasikivi.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210716114105.GF3@paasikivi.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 16, 2021 at 02:41:05PM +0300, Sakari Ailus wrote: > On Wed, Jul 14, 2021 at 10:45:26PM +0300, Andy Shevchenko wrote: > > > >> drivers/media/v4l2-core/v4l2-ioctl.c:347:37: warning: taking address of packed member 'pixelformat' of class or structure 'v4l2_sdr_format' may result in an unaligned pointer value [-Waddress-of-packed-member] > > > > Why is it packed in the first place? Is it used on unaligned addresses > > in other structures? But even so, why should it matter? > > It's packed since we wanted to avoid having holes in the structs. There are > other ways to do that but it's ABI dependent and is prone to human errors, > too. What holes can you think about in the above mention structure? In case if you are going to extend it you will need anyway changes somewhere else as well. -- With Best Regards, Andy Shevchenko