From mboxrd@z Thu Jan 1 00:00:00 1970 From: vitalywool@gmail.com (Vitaly Wool) Date: Tue, 3 Aug 2010 16:17:37 +0200 Subject: [PATCH v2 03/20] mmc: support embedded data field in mmc_host In-Reply-To: References: <1279733634-21974-1-git-send-email-ohad@wizery.com> <1279733634-21974-4-git-send-email-ohad@wizery.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Ohad, On Mon, Aug 2, 2010 at 11:35 PM, Ohad Ben-Cohen wrote: > I'm honestly trying to understand your concerns, but I'm afraid that > just saying "it's a hack" is not too informative. Can you please > explain what do you think is technically wrong with the proposed > solution ? is it not general enough for other use cases ? will it > break something ? let's summarize the solution you're proposing. You're trying to add embedded_data which will be scattered all over the place. The patches you introduce do the following: - add the pointer to the mmc core header; - add the primitive to set it from the controller driver; - add the pointer to the board-specific header; - add the structure to the board-specific C file and propagate its pointer to the controller driver; - add setting the pointer in the core structure into the controller driver. So if I'd like to set the *same* structure for the *same* WL1271 driver, provided that I'm working with the other platform, I'll need to do the following: - add the pointer to the board-specific header; - add the structure to the board-specific C file and propagate its pointer to the controller driver; - add setting the pointer in the core structure into the controller driver. This is far from being intuitive. This means we need to hack, generally speaking, all the MMC controller drivers to get it working on all platforms. This is error prone. And I'm not even speaking about the fact that MMC controller driver should not deal with such things at all. Thanks, Vitaly