From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754193AbbDPU5s (ORCPT ); Thu, 16 Apr 2015 16:57:48 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:38391 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752325AbbDPU5k (ORCPT ); Thu, 16 Apr 2015 16:57:40 -0400 Date: Thu, 16 Apr 2015 21:57:39 +0100 From: Al Viro To: Sathya Perla Cc: "linux-kernel@vger.kernel.org" Subject: Re: sparse warning about endianness mismatch on 0xffff assignment Message-ID: <20150416205739.GY889@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 16, 2015 at 06:04:40AM +0000, Sathya Perla wrote: > What would be the best way of fixing this warning? > > a) __le16 var = cpu_to_le16(0xFFFF); That would do just fine - it's a constant expression, actually.