Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10158567rwr; Fri, 12 May 2023 04:48:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6moi2/8uXOBdt2rfQe1IT3XnSp7r9yNh+lJquOwnFySDfwXmwhhANOtO+vIX+MzesBspLb X-Received: by 2002:a17:90b:23d7:b0:250:2311:1535 with SMTP id md23-20020a17090b23d700b0025023111535mr26309101pjb.24.1683892095407; Fri, 12 May 2023 04:48:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683892095; cv=none; d=google.com; s=arc-20160816; b=U0HMhAxQ460ui3RybECFdmueayEMtbtaHTRh1pln84LFDeovI7xWacL715NAt8ow8w wc7EpOdAhC7Moq2+twbl1f+MZq3+IwhxGX7Etcke0TfKyxAIIjmTNq9B6QWvOACNyLeG 48O18AQ7UiPtoUGH+RCMCQOMZfCsHS+zvzxWqSSjXfgtOIviBN5qm4kRkx+PcR6pz1yi ZxBKwrSFLn7H5ZcTiNSuOzK/8PneFxtSz644/IG/6kGjhBi0MoAqNdq3KVOXF9RHPODV gSKD40Ohz2HeCs/69uKCHEsxlDBB6jRO7larxtziy2o3JcR5Td2ivw3oUzT+9NQCf6yP B4Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=TrwTZm4CXc/0YHHv3eM1rS9nMKO6ne3nZId0ZtYk9cA=; b=fkwhnPeg8lieOSrRkhM9FYMK0oMtlSgICQJ1S2KG12AeLS0l9IfRP0jQEas4sUda0O lCS8wEoyQJTaYXSMdUQVU4HVjYR2W8qLcln12c3fTBzyGhqUapoeIBEhtYUF+yapAVTs 6sdGG5DcFZNWCWJUIjan3P2I7eM68ucaFr1/hSFOrLpK04hj2hNhZrCdI1T7BqkDVP/i CRml7KpHK7CpEGDF/GMM4/gkqAjJ5eHYeHSI2DV5/NZrZkgHnysnp1ZDkMQNz1824MG/ 7TdT7dbS5YPkVpXgAX20BEWqkc88H2rAzEtju2bSqeNFMUs0sY7v3/tFBekjvptNTXaX 22oA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id na3-20020a17090b4c0300b0024e1911ab42si28732894pjb.18.2023.05.12.04.48.01; Fri, 12 May 2023 04:48:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241070AbjELLQl convert rfc822-to-8bit (ORCPT + 99 others); Fri, 12 May 2023 07:16:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241028AbjELLQi (ORCPT ); Fri, 12 May 2023 07:16:38 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60EE81162B for ; Fri, 12 May 2023 04:16:35 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-249-VSjj4jpZOom7AJRUgPGuWQ-1; Fri, 12 May 2023 12:16:32 +0100 X-MC-Unique: VSjj4jpZOom7AJRUgPGuWQ-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 12 May 2023 12:16:30 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Fri, 12 May 2023 12:16:30 +0100 From: David Laight To: 'Thomas Zimmermann' , "deller@gmx.de" , "geert@linux-m68k.org" , "javierm@redhat.com" , "daniel@ffwll.ch" , "vgupta@kernel.org" , "chenhuacai@kernel.org" , "kernel@xen0n.name" , "davem@davemloft.net" , "James.Bottomley@HansenPartnership.com" , "arnd@arndb.de" , "sam@ravnborg.org" , "suijingfeng@loongson.cn" CC: "linux-fbdev@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-arch@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-ia64@vger.kernel.org" , "loongarch@lists.linux.dev" , "linux-m68k@lists.linux-m68k.org" , "sparclinux@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-parisc@vger.kernel.org" , kernel test robot , "Artur Rojek" Subject: RE: [PATCH v7 1/7] fbdev/hitfb: Cast I/O offset to address Thread-Topic: [PATCH v7 1/7] fbdev/hitfb: Cast I/O offset to address Thread-Index: AQHZhLwIoJOHAKlHvkaeoWR92INTOa9We4fw Date: Fri, 12 May 2023 11:16:30 +0000 Message-ID: References: <20230512102444.5438-1-tzimmermann@suse.de> <20230512102444.5438-2-tzimmermann@suse.de> In-Reply-To: <20230512102444.5438-2-tzimmermann@suse.de> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,PDS_BAD_THREAD_QP_64, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Zimmermann > Sent: 12 May 2023 11:25 > > Cast I/O offsets to pointers to use them with I/O functions. The I/O > functions expect pointers of type 'volatile void __iomem *', but the > offsets are plain integers. Build warnings are > > ../drivers/video/fbdev/hitfb.c: In function 'hitfb_accel_wait': > ../arch/x86/include/asm/hd64461.h:18:33: warning: passing argument 1 of 'fb_readw' makes pointer > from integer without a cast [-Wint-conversion] > 18 | #define HD64461_IO_OFFSET(x) (HD64461_IOBASE + (x)) > | ^~~~~~~~~~~~~~~~~~~~~~ ... > 52 | static inline u16 fb_readw(const volatile void __iomem *addr) > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ > > This patch only fixes the build warnings. It's not clear if the I/O > offsets can legally be passed to the I/O helpers. It was apparently > broken in 2007 when custom inw()/outw() helpers got removed by > commit 34a780a0afeb ("sh: hp6xx pata_platform support."). Fixing the > driver would require setting the I/O base address. Did you try changing the definition of HD64461_IOBASE to include a (volatile void __iomem *) cast? A lot less churn... I'm guessing that 'sh' deosn't have in/out instructions so this is something that is always mapped at a fixed kernel virtual address? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)