Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1086939pxb; Thu, 15 Apr 2021 13:44:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ63zA5ixy9GNTTrNe9TSkxhiGJHelODHOvQiJOYEQsiWNLp2cIXziB77ynw68af5/zlpT X-Received: by 2002:a17:906:48c4:: with SMTP id d4mr5506073ejt.548.1618519495249; Thu, 15 Apr 2021 13:44:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618519495; cv=none; d=google.com; s=arc-20160816; b=SK7Zv2vwUaFxxcC3wOMa5taTwFmXBL6yyDKGqlZ/qswxIonMwDf1IOeLEpx2gpcu9U bwYAiW+IlPMonGMGS5NCzPdQ33Kpt3xbIH9NWt7HVf2GV84BEuBI/oG90mDplqyjPwYm eMOm5i9b1QuuCU5rsSnRv+ftTkjXLNiWqiP8PqnvdZ6wmwcF/Pj1f/wYmD/rhMDaPgZ0 ILKlkQdNsfBGXY+v8UviAcivfxVSZaALT07vni2Lbo+vDOfjGrhXST0NXQPv/fXDq0wa WZMSMnX6oKkMB3s/J6m15tvi2ZveTuL8ok/s9aNn0kXYmj0u4ZyLsNR8/My2MnDTDtoQ 03hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=m+xRwBY2NkjmpfEpnavQM5Xmf5UyWcL2mqqYZ4UlzkA=; b=n9RJO094BtZPC8wy7Dtflzvm3gbOw9Y1AW40dJdMpYkJDMzvFO/caF+rQm1nWT8YzG /zFlWKfh+CYsC6WvOgf005i48nPDssBuv8fG1FHFvfgW6GAoIB7Wgf47xFsNJStB+aJj 5K1rvEeFGOmtL+bwtAm807WgFBp30GFiZd3mUJKLHoAm3t0IdFkFkRHU2jNh2evVPwPx K7dqzfX7Nc04790lAO7ASU8QufEi0JYfrGg9zBZ48b9glQPv8aeHDG9xddDU1YXS/C4g XH9bDN+lWzQ+YeCLTgl9tl+RjluuwrcLmiujas+gTFfe4kGEdwSqvZlpkAI9BeQe39bK 1feA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w25si2963497ejv.100.2021.04.15.13.44.31; Thu, 15 Apr 2021 13:44:55 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235539AbhDOUht (ORCPT + 99 others); Thu, 15 Apr 2021 16:37:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235251AbhDOUhs (ORCPT ); Thu, 15 Apr 2021 16:37:48 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F284C061574; Thu, 15 Apr 2021 13:37:24 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lX8jn-005aeZ-QE; Thu, 15 Apr 2021 20:37:19 +0000 Date: Thu, 15 Apr 2021 20:37:19 +0000 From: Al Viro To: Bence =?iso-8859-1?B?Q3Pza+Fz?= Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fix 'assignment to __be16' warning Message-ID: References: <20210412115302.95686-1-bence98@sch.bme.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210412115302.95686-1-bence98@sch.bme.hu> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 11:53:02AM +0000, Bence Cs?k?s wrote: > While the preamble field _is_ technically big-endian, its value is always 0x2A2A, > which is the same in either endianness, therefore it should be u16 instead. Just replace the assignment with htons(0x2A2A) and be done with that - it's a constant expression and compiler will yield the same assembler.