Date: Mon, 14 Apr 2003 10:44:01 -0700 (PDT) From: Linus Torvalds To: Paul Mackerras cc: Alan Cox , Geert Uytterhoeven , Linux Kernel Development Subject: Re: [PATCH] M68k IDE updates In-Reply-To: <16025.63003.968553.194791@nanango.paulus.ozlabs.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org X-Spam-Status: No, hits=-26.3 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES,USER_AGENT_PINE,X_MAILING_LIST autolearn=ham version=2.53-osdl_revision__1.4__ X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.53-osdl_revision__1.4__ (1.174.2.15-2003-03-30-exp) On Mon, 14 Apr 2003, Paul Mackerras wrote: > > Since __ide_mm_insw doesn't get told whether it is transferring normal > sector data or drive ID data, it can't necessarily do the right thing > in both situations. Can we please then just separate the two functions out into "fetch sector data" and "fetch drive ID"? And NOT playing with another frigging broken passed-down flag that people get wrong and isn't obvious what it does anyway? It's a lot easier to do /* On sane architectures, data and ID are accessed the same */ #define ide_fetch_sector_data(...) __ide_fetch_data(..) #define ide_fetch_id_data(...) __ide_fetch_data(..) than it is to carry a flag around and having to remember to get it right in every place this is used. It's more efficient too, but the _clarity_ and lack of dynamic flags is a hell of a lot more important. And stupid architectures that may have to re-implement (and possible duplicate) the ID fetch code only have themselves to blame. Although it might easily be as simple as /* * The PCI bus is wired up the wrong way, we need to byteswap * the ID results after they come back */ static inline xxx ide_fetch_id_data(...) { __ide_fetch_data(..) bswap_id_data(..) } and please keep this in some m68k-specific file instead of forcing _everybody_ to know about the braindamage. Linus -