Return-path: Received: from mail-oi0-f68.google.com ([209.85.218.68]:34467 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758057AbcIXQfC (ORCPT ); Sat, 24 Sep 2016 12:35:02 -0400 Subject: Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages To: Joe Perches , Jean Delvare References: <1474654333.1849.5.camel@perches.com> <1474657363.1849.9.camel@perches.com> <20160924175555.01cae6dd@endymion> <1474733754.23838.3.camel@perches.com> Cc: Chaoming Li , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Larry Finger Message-ID: <49094659-662d-a902-6740-ea3d1fea6660@lwfinger.net> (sfid-20160924_183508_443633_9FD14177) Date: Sat, 24 Sep 2016 11:35:00 -0500 MIME-Version: 1.0 In-Reply-To: <1474733754.23838.3.camel@perches.com> Content-Type: text/plain; charset=windows-1252; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 09/24/2016 11:15 AM, Joe Perches wrote: > On Sat, 2016-09-24 at 17:55 +0200, Jean Delvare wrote: >> Would it make sense to explicitly set the enum values, or add them as >> comments, to make such look-ups easier? > > If you want to create enum->#ENUM structs and > "const char *" lookup functions, please be my guest. > > otherwise, hex is at least a consistent way to display > what should be infrequent output. Displaying those values as hex is OK. As Joe says, they will not be shown very often. I have patches that makes HAL_DEF_WOWLAN be a no-op for the rest of the drivers, and one that sets the enum values for that particular statement to hex values. I also looked at the other large enums and decided that they never need the human lookup. Larry