From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B5E6C433F5 for ; Tue, 12 Apr 2022 12:20:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348467AbiDLMWR (ORCPT ); Tue, 12 Apr 2022 08:22:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357106AbiDLMUj (ORCPT ); Tue, 12 Apr 2022 08:20:39 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11D164AE3F for ; Tue, 12 Apr 2022 04:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649762867; x=1681298867; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=gIs6XvcWXzPcGcyZ4rwFB88kIQ7FOgRfZOHvOled5dE=; b=QcsPXEs9Gz6QA2nD7BpODxRIY7Y6uaY7XWHknIwXRPY0xJhG/F8QxIx1 g73NzHEECaLgx8CbJevCo+CGuad/YnOeCqk93dq3e3T6pZGeOZp2Pda7i 1VRtwcEcM0QjeqpqzrD/8TRHvb/InM1Ac3pDrpsPrVRBC39tn3LUQ9tZ2 Gqe65jHgy+HJybZaHqbMtTo9Ok1Kc0/zwUW+HbT6pdZYcyuI117q8V6PD qp7ITjUai+Cr81J8FezlIZkfbl8m3tbSCnhuy1GgoQYPqo2h8Y+jpCmGP sOgyHUhHfrnxbIihf6Ucttv+eub99mRXji5PUnyRouwNM3rw3O4gN6Qxq g==; X-IronPort-AV: E=McAfee;i="6400,9594,10314"; a="249636870" X-IronPort-AV: E=Sophos;i="5.90,253,1643702400"; d="scan'208";a="249636870" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2022 04:24:51 -0700 X-IronPort-AV: E=Sophos;i="5.90,253,1643702400"; d="scan'208";a="611397331" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2022 04:24:48 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1neEa4-001YkI-Tg; Tue, 12 Apr 2022 14:21:08 +0300 Date: Tue, 12 Apr 2022 14:21:08 +0300 From: Andy Shevchenko To: Javier Martinez Canillas Cc: Geert Uytterhoeven , Linux Kernel Mailing List , Rob Herring , DRI Development , Neil Armstrong , Mark Brown , Chen-Yu Tsai , Daniel Vetter , David Airlie Subject: Re: [PATCH v2 4/5] drm/solomon: Move device info from ssd130x-i2c to the core driver Message-ID: References: <20220411211243.11121-1-javierm@redhat.com> <20220411211243.11121-5-javierm@redhat.com> <4128b288-2b9a-f9cd-01f3-a1d50d3e10bb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4128b288-2b9a-f9cd-01f3-a1d50d3e10bb@redhat.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 Tue, Apr 12, 2022 at 10:07:02AM +0200, Javier Martinez Canillas wrote: > On 4/12/22 09:23, Geert Uytterhoeven wrote: > > On Mon, Apr 11, 2022 at 11:12 PM Javier Martinez Canillas > > wrote: ... > >> - ssd130x->device_info = device_get_match_data(dev); > >> + > >> + variant = (enum ssd130x_variants)device_get_match_data(dev); > > > > (uintptr_t), to avoid a cast from pointer to integer of different > > size warning. > > > > Indeed. The kernel test robot reported the same. Not only because of this, but also with the non-NULL pointers I prefer the old style without ugly castings. Instead, you may export the array (in the driver's namespace) and use &info[ID] pointer for the specific device info. -- With Best Regards, Andy Shevchenko