From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752141AbdJCQeF (ORCPT ); Tue, 3 Oct 2017 12:34:05 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58482 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721AbdJCQeE (ORCPT ); Tue, 3 Oct 2017 12:34:04 -0400 Date: Tue, 3 Oct 2017 18:34:12 +0200 From: Greg KH To: Alfonso Lima Astor Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: fbtft: diferenciate between buffer and data types to fix sparse warning Message-ID: <20171003163412.GA16638@kroah.com> References: <1506532578-9261-1-git-send-email-alfonsolimaastor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1506532578-9261-1-git-send-email-alfonsolimaastor@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 27, 2017 at 06:16:18PM +0100, Alfonso Lima Astor wrote: > sparse was complaning about an incorrect type cast: > drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment (different base types) > drivers/staging/fbtft/fbtft-bus.c:60:1: expected unsigned short [unsigned] [short] [usertype] > drivers/staging/fbtft/fbtft-bus.c:60:1: got restricted __be16 [usertype] > drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment (different base types) > drivers/staging/fbtft/fbtft-bus.c:60:1: expected unsigned short [unsigned] [short] [usertype] > drivers/staging/fbtft/fbtft-bus.c:60:1: got restricted __be16 [usertype] > > The solution is to add an extra parameter to the macro to > diferenciate between buffer type and data type. Ugh, messy. Please resend and cc: the maintainers of this driver/code so that they can verify this is correct. As it is, I have no way of determining that... thanks, greg k-h