Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3004ybf; Wed, 26 Feb 2020 07:47:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyHHonXJ1q2861jo+hEZlBvcr1pVgTcI7/wjw6MqI0QbDkJf5ly5uhUrV6RURRDygJs2Y14 X-Received: by 2002:a05:6830:1385:: with SMTP id d5mr3804015otq.61.1582732076377; Wed, 26 Feb 2020 07:47:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582732076; cv=none; d=google.com; s=arc-20160816; b=ZvuOQDhL6e9csb4dBgoYr79IA8ki9koyfMrlBGLlOmL560wGXVl8wmdpCowOzWItim 4AUDzkFTKYqiKPNN55qRbLHT63kqX3e0VLc4wYKy54s/rXCsbrg0zhlTvR8hpkmyHLmc ZSpvS+eoRKYGhRrq9rQU5yxcjPn80DPrcKirOcBqte7RwPzXf81J/kdBv/+CjxDIA00g DSk3NTUEZFUHhk7HTq/A19vk5WOLfcl6JW278I+gpx+VaqyCiMUi4DuHIX4x+4BOQomd Dgc2MR8DUPowd3qsyvZUIh8j2EUWtWg5TsgWyBa9Pee0S+dQ6nP9g2PhAbkecTTtwjmU qErA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Z0wy6pMXRGzDDtgwV8FJ8y6I33yL3bUaI0E6FqCnOYE=; b=GOvGqGJHkrUSJ0hqucSFSLkNMdwb50/faX7c/ysuibKmdQiUr/g8gwHNZeXGo06QZK pfWPMI/8UIF91nmmPwdphdiNMj5z/iRvsceW17ysSvBjM8/faFe3QARFOjfDNHeR+4Jw ttUa+N/I0E74lmQ6HuSjChohQvDSHHUG6Yty3rp0Bed8i5TWR+5aCm1cjBTXXuaoyLyd 9HAFZKz/47/BjzGPG/QVYTLa5jDS05kJYtjSH5ikgufbYv6HN1sl1vbrKUEFID/jp1PY jXWAX3SHOjJu2XTwdrjD5VmRwZy/sOyjBuTPPHNZMxUi6H3AbLFr9pVEQfT3x/C3H5qh gksw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si1625477otn.140.2020.02.26.07.47.43; Wed, 26 Feb 2020 07:47:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728405AbgBZPqs (ORCPT + 99 others); Wed, 26 Feb 2020 10:46:48 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:31596 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728244AbgBZPqs (ORCPT ); Wed, 26 Feb 2020 10:46:48 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 01QFkesY002182; Wed, 26 Feb 2020 16:46:40 +0100 Date: Wed, 26 Feb 2020 16:46:40 +0100 From: Willy Tarreau To: Denis Efremov Cc: Linus Torvalds , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 15/16] floppy: separate the FDC's base address from its registers Message-ID: <20200226154640.GB2054@1wt.eu> References: <20200224212352.8640-1-w@1wt.eu> <20200226080732.1913-1-w@1wt.eu> <20200226080732.1913-5-w@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 26, 2020 at 06:36:52PM +0300, Denis Efremov wrote: > > One place in the ARM code used to check if the port was equal to FD_DOR, > > this was changed to testing the register by applying a mask to the port, > > as was already done in the sparc code. > > > > The sparc, m68k and parisc code could now be slightly cleaned up to > > benefit from the macro definitions above instead of the equivalent > > hard-coded values. > > Just to note for future ref: the mask (7) can be introduced as define > during future clean up of these magic constants. I'd rather not add it because if we finish to clean up the internal API, then we can have fd_outb(value, base, reg) and fd_inb(base, reg) where reg is one of FD_* and base the base address. In this context we don't need the mask anymore since the register is placed there verbatim. I do have another earlier patch which did just that, its just that I attacked the problem from the wrong side, resulting in too many changes at once for my taste. But I definitely see how we can finish that job and make everything almost elegant. Willy