linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Erik Schmauss <erik.schmauss@intel.com>
Cc: kbuild-all@lists.01.org, linux-acpi@vger.kernel.org,
	devel@acpica.org, linux-pm@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Bob Moore <robert.moore@intel.com>
Subject: [pm:bleeding-edge 57/72] drivers/acpi/acpica/dbinput.c:514:7: warning: multi-character character constant
Date: Fri, 25 Oct 2019 22:32:24 +0800	[thread overview]
Message-ID: <201910252218.jR63NPNA%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4716 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   1cf26ab470eb62bb4f239eb0d9410f8c174bed6b
commit: 72ad7b25e6357468b3f5306f2c716313a7664d39 [57/72] ACPICA: debugger: add field unit support for acpi_db_get_next_token
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 72ad7b25e6357468b3f5306f2c716313a7664d39
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/acpi/acpica/dbinput.c: In function 'acpi_db_get_next_token':
>> drivers/acpi/acpica/dbinput.c:514:7: warning: multi-character character constant [-Wmultichar]
     case ' {':
          ^~~~
>> drivers/acpi/acpica/dbinput.c:514:2: warning: case label value exceeds maximum value for type
     case ' {':
     ^~~~

vim +514 drivers/acpi/acpica/dbinput.c

   444	
   445	/*******************************************************************************
   446	 *
   447	 * FUNCTION:    acpi_db_get_next_token
   448	 *
   449	 * PARAMETERS:  string          - Command buffer
   450	 *              next            - Return value, end of next token
   451	 *
   452	 * RETURN:      Pointer to the start of the next token.
   453	 *
   454	 * DESCRIPTION: Command line parsing. Get the next token on the command line
   455	 *
   456	 ******************************************************************************/
   457	
   458	char *acpi_db_get_next_token(char *string,
   459				     char **next, acpi_object_type *return_type)
   460	{
   461		char *start;
   462		u32 depth;
   463		acpi_object_type type = ACPI_TYPE_INTEGER;
   464	
   465		/* At end of buffer? */
   466	
   467		if (!string || !(*string)) {
   468			return (NULL);
   469		}
   470	
   471		/* Remove any spaces at the beginning */
   472	
   473		if (*string == ' ') {
   474			while (*string && (*string == ' ')) {
   475				string++;
   476			}
   477	
   478			if (!(*string)) {
   479				return (NULL);
   480			}
   481		}
   482	
   483		switch (*string) {
   484		case '"':
   485	
   486			/* This is a quoted string, scan until closing quote */
   487	
   488			string++;
   489			start = string;
   490			type = ACPI_TYPE_STRING;
   491	
   492			/* Find end of string */
   493	
   494			while (*string && (*string != '"')) {
   495				string++;
   496			}
   497			break;
   498	
   499		case '(':
   500	
   501			/* This is the start of a buffer, scan until closing paren */
   502	
   503			string++;
   504			start = string;
   505			type = ACPI_TYPE_BUFFER;
   506	
   507			/* Find end of buffer */
   508	
   509			while (*string && (*string != ')')) {
   510				string++;
   511			}
   512			break;
   513	
 > 514		case ' {':
   515	
   516			/* This is the start of a field unit, scan until closing brace */
   517	
   518			string++;
   519			start = string;
   520			type = ACPI_TYPE_FIELD_UNIT;
   521	
   522			/* Find end of buffer */
   523	
   524			while (*string && (*string != '}')) {
   525				string++;
   526			}
   527			break;
   528	
   529		case '[':
   530	
   531			/* This is the start of a package, scan until closing bracket */
   532	
   533			string++;
   534			depth = 1;
   535			start = string;
   536			type = ACPI_TYPE_PACKAGE;
   537	
   538			/* Find end of package (closing bracket) */
   539	
   540			while (*string) {
   541	
   542				/* Handle String package elements */
   543	
   544				if (*string == '"') {
   545					/* Find end of string */
   546	
   547					string++;
   548					while (*string && (*string != '"')) {
   549						string++;
   550					}
   551					if (!(*string)) {
   552						break;
   553					}
   554				} else if (*string == '[') {
   555					depth++;	/* A nested package declaration */
   556				} else if (*string == ']') {
   557					depth--;
   558					if (depth == 0) {	/* Found final package closing bracket */
   559						break;
   560					}
   561				}
   562	
   563				string++;
   564			}
   565			break;
   566	
   567		default:
   568	
   569			start = string;
   570	
   571			/* Find end of token */
   572	
   573			while (*string && (*string != ' ')) {
   574				string++;
   575			}
   576			break;
   577		}
   578	
   579		if (!(*string)) {
   580			*next = NULL;
   581		} else {
   582			*string = 0;
   583			*next = string + 1;
   584		}
   585	
   586		*return_type = type;
   587		return (start);
   588	}
   589	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 70177 bytes --]

                 reply	other threads:[~2019-10-25 14:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910252218.jR63NPNA%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devel@acpica.org \
    --cc=erik.schmauss@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).