Re: [PATCH 8/8] x86/platform/uv: Account for UV Hubless in is_uvX_hub Ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 9/3/2019 11:58 AM, Mike Travis wrote:


On 9/3/2019 9:19 AM, Christoph Hellwig wrote:
On Mon, Sep 02, 2019 at 07:18:23PM -0500, Mike Travis wrote:
+#ifdef    UV1_HUB_IS_SUPPORTED

All these ifdefs are dead code, please just remove them.

Those ifdefs are not dead code and are being actively used.  Plus UV1 support is dead and I think the last running system died about a year ago and no support or parts are available.  So undef'ing these macros will simplify and reduce the size of the object code.

I forgot to add that if we do undef one of those "is supported" the code will eventually be removed, thus simplifying the source even more. So including the ifdef's in the source make that code easier to find.

Also it seems like at least the various mmr macros just check
for a specific version, I think you are much better off just
using a switch statement for the possible revisions there.

+        return (uv_hub_info->hub_revision == UV4A_HUB_REVISION_BASE);

The problem is those revision bases can change if a UV HUB revision changes.  That is why there are ranges and why I'm converting them to "uv_type".  Some UV kernel source code still needs to know the exact HUB revision, like (again) hwperf.


And none of these braces are required.


Sure, I can take those out now, but usually I then get bit by checkpatches which then says "parenthesis's are required".



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux