Received: by 10.192.165.148 with SMTP id m20csp1894535imm; Thu, 26 Apr 2018 03:54:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+lEX3UL4CSjksD6Y88TFNJ920Pw3q0MSNFjDJ8iCWLbrY6FkyT6H7R9xSrx7pOo0YAvreO X-Received: by 10.101.65.4 with SMTP id w4mr26270888pgp.181.1524740084449; Thu, 26 Apr 2018 03:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524740084; cv=none; d=google.com; s=arc-20160816; b=C6/WYyBeqb0gfHPGQXp4jkbngdQLefiogKsNzclUSMGlmISkT7eKBX/hYitkZVQOpL gQSAdH42FMXGfHOn9Mo9xsrW6TpzN5Q0XxRz9JmQn7jxtmdLWLCxCMgD1S3xBnk17+f5 gmy7HX6f2/IjduO/vvHpDtdDbQ5YWmz+sKhrvUHLVut5Fy1xvbPjq4EX3P/IiQGdLyv1 zBjt5gduzWTgKjQFsA7ZtSlGWzLko9tvWjLSbp11Zl/yMDI0gse2AnJKPLgodNDVyWTT 7TiCOzDstwi8StMtsBHEV8ByQPHFmiVHEYTIBNA6SEio2jKECUl8pBA7OHG7vL9z3qtX /0iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=Iyj+wVgR9mwlBwGxVWeN+yKqpz3Hh8dHbwzVSLVm49Q=; b=iLZsUObB0nWjA6qAhc3wa9JM04bI4JO7hC4INLQ878On5diVXpmF9Jd++PCtQIJjyU VoKTBQRY69K2lxkv9EEMJav/ir9Y/Xg0zCKVnioITC53HmZ2s4YgGFC8FdBK7WiJ5bOO p8B6ac0i/NSgWDrH1gwRR3DyzdzWvlehbQn6Jn76SEwfCKlFTR1iTqvaGm+o+UUsse0m yl2CcyJoWG8J3RuQ4TXeXrSGPag5HgXk99mRersZo8cUhAk/wqlSFKJEWVH/fpjTKt6O 0wD9JhdIUOUdM8LVypuDrqbPpZ5iCo6DhBK5Bp96uq4tTeFP/qXpK92Wl16aLANizpI/ MPBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L11MmNHD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12-v6si18283591pld.367.2018.04.26.03.54.29; Thu, 26 Apr 2018 03:54:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L11MmNHD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755368AbeDZKxT (ORCPT + 99 others); Thu, 26 Apr 2018 06:53:19 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:38130 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754219AbeDZKxR (ORCPT ); Thu, 26 Apr 2018 06:53:17 -0400 Received: by mail-ot0-f195.google.com with SMTP id j27-v6so28730614ota.5 for ; Thu, 26 Apr 2018 03:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Iyj+wVgR9mwlBwGxVWeN+yKqpz3Hh8dHbwzVSLVm49Q=; b=L11MmNHDRZcbfDjZrChLEvZ6yYyWPvhr7lFbPQz0rG4hgeqZ87dRRf1mrBekZbBwRw AQY786Crgoe/Dd8zduAKKUmBvGxWjKP5eMZuzgI9de53qSecqVsuI4PCNoxXrholpWoE zQUEqswccJJE7VnFYfVyRoe+XiUrmmNEpMuw4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Iyj+wVgR9mwlBwGxVWeN+yKqpz3Hh8dHbwzVSLVm49Q=; b=OjFz/sReKQrwCNxxY8wJLO56wb+nMpp+23OydVu0qsF9fZaT/A5lxrvYz0RElrAYbb MAHu+15K67QE9XKYl/a3zyueO6SmxHIaUnNUrYuJ+7TJrxHsOgO2pExVOzcRX+s1htW4 BOWl0I/du/8yBOYLDcX+IuBaiqiCtXoMHJXRoHqIKpEouUxh3fiHFmOC0/CF+Vf7DJDR NQ8tQrWX/mVHzqGhaEtHoFe6l6uNAKY8RzfKDA19dFS+EaW+Gi2rgrUvMd9Hf+/Dgutx J2MwQCqpvTD9PecTbyWs1vU4yKlbjsxTrBCy+KUKodq8GegVG9mXilO5YArjzwl1oQR8 LpIg== X-Gm-Message-State: ALQs6tCPHi3nMjlqzh3k5rc28kkvkFxMAQX2i03BaN3jTMGKEIpw/sxi GgmHIX8RphDNv6/NBH/BB90AEs4cvKoRoDZ91Hf08A== X-Received: by 2002:a9d:5508:: with SMTP id l8-v6mr4348131oth.159.1524739997119; Thu, 26 Apr 2018 03:53:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2d77:0:0:0:0:0 with HTTP; Thu, 26 Apr 2018 03:53:16 -0700 (PDT) In-Reply-To: <201804261703.caDB8Qo5%fengguang.wu@intel.com> References: <7809a25514e8f7f72a276d19414346b2e4100945.1524570852.git.baolin.wang@linaro.org> <201804261703.caDB8Qo5%fengguang.wu@intel.com> From: Baolin Wang Date: Thu, 26 Apr 2018 18:53:16 +0800 Message-ID: Subject: Re: [PATCH 4/8] ALSA: Avoid using timespec for struct snd_pcm_status To: kbuild test robot Cc: kbuild-all@01.org, Jaroslav Kysela , Takashi Iwai , Arnd Bergmann , Liam Girdwood , Mark Brown , Takashi Sakamoto , Ingo Molnar , SF Markus Elfring , Dan Carpenter , jeeja.kp@intel.com, Vinod Koul , Guneshwor Singh , subhransu.s.prusty@intel.com, Bhumika Goyal , gudishax.kranthikumar@intel.com, Naveen M , hardik.t.shah@intel.com, Arvind Yadav , Fabian Frederick , alsa-devel@alsa-project.org, LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On 26 April 2018 at 17:20, kbuild test robot wrote: > Hi Baolin, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on v4.17-rc2] > [cannot apply to sound/for-next asoc/for-next arm-soc/for-next next-20180= 426] > [if your patch is applied to the wrong git tree, please drop us a note to= help improve the system] > > url: https://github.com/0day-ci/linux/commits/Baolin-Wang/Fix-year-203= 8-issue-for-sound-subsystem/20180426-010145 > reproduce: > # apt-get install sparse > make ARCH=3Dx86_64 allmodconfig > make C=3D1 CF=3D-D__CHECK_ENDIAN__ > > > sparse warnings: (new ones prefixed by >>) > > sound/core/pcm_native.c:561:51: sparse: incorrect type in assignment (= different base types) @@ expected restricted snd_pcm_state_t [usertype] = state @@ got t [usertype] state @@ > sound/core/pcm_native.c:561:51: expected restricted snd_pcm_state_t= [usertype] state > sound/core/pcm_native.c:561:51: got int [signed] state > sound/core/pcm_native.c:726:38: sparse: incorrect type in argument 2 (= different base types) @@ expected int [signed] state @@ got restricte= d snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:726:38: expected int [signed] state > sound/core/pcm_native.c:726:38: got restricted snd_pcm_state_t [use= rtype] > sound/core/pcm_native.c:738:38: sparse: incorrect type in argument 2 (= different base types) @@ expected int [signed] state @@ got restricte= d snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:738:38: expected int [signed] state > sound/core/pcm_native.c:738:38: got restricted snd_pcm_state_t [use= rtype] > sound/core/pcm_native.c:787:38: sparse: incorrect type in argument 2 (= different base types) @@ expected int [signed] state @@ got restricte= d snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:787:38: expected int [signed] state > sound/core/pcm_native.c:787:38: got restricted snd_pcm_state_t [use= rtype] >>> sound/core/pcm_native.c:995:34: sparse: incorrect type in initializer (= different base types) @@ expected signed int [signed] [usertype] [explic= itly-signed] state @@ got restricted ssigned int [signed] [usertype] [ex= plicitly-signed] state @@ > sound/core/pcm_native.c:995:34: expected signed int [signed] [usert= ype] [explicitly-signed] state > sound/core/pcm_native.c:995:34: got restricted snd_pcm_state_t [add= ressable] [assigned] [usertype] state >>> sound/core/pcm_native.c:1006:44: sparse: incorrect type in initializer = (different base types) @@ expected signed int [signed] [usertype] [expli= citly-signed] suspended_state @@ got restricted ssigned int [signed] [us= ertype] [explicitly-signed] suspended_state @@ > sound/core/pcm_native.c:1006:44: expected signed int [signed] [user= type] [explicitly-signed] suspended_state > sound/core/pcm_native.c:1006:44: got restricted snd_pcm_state_t [ad= dressable] [assigned] [usertype] suspended_state > sound/core/pcm_native.c:1259:32: sparse: incorrect type in assignment = (different base types) @@ expected restricted snd_pcm_state_t [usertype]= state @@ got t [usertype] state @@ > sound/core/pcm_native.c:1259:32: expected restricted snd_pcm_state_= t [usertype] state > sound/core/pcm_native.c:1259:32: got int [signed] state > sound/core/pcm_native.c:1283:31: sparse: incorrect type in argument 3 = (different base types) @@ expected int [signed] state @@ got restrict= ed snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:1283:31: expected int [signed] state > sound/core/pcm_native.c:1283:31: got restricted snd_pcm_state_t [us= ertype] > sound/core/pcm_native.c:1290:40: sparse: incorrect type in argument 3 = (different base types) @@ expected int [signed] state @@ got restrict= ed snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:1290:40: expected int [signed] state > sound/core/pcm_native.c:1290:40: got restricted snd_pcm_state_t [us= ertype] > sound/core/pcm_native.c:1316:28: sparse: restricted snd_pcm_state_t de= grades to integer > sound/core/pcm_native.c:1318:40: sparse: incorrect type in assignment = (different base types) @@ expected restricted snd_pcm_state_t [usertype]= state @@ got t [usertype] state @@ > sound/core/pcm_native.c:1318:40: expected restricted snd_pcm_state_= t [usertype] state > sound/core/pcm_native.c:1318:40: got int [signed] state > sound/core/pcm_native.c:1342:64: sparse: incorrect type in argument 3 = (different base types) @@ expected int [signed] state @@ got restrict= ed snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:1342:64: expected int [signed] state > sound/core/pcm_native.c:1342:64: got restricted snd_pcm_state_t [us= ertype] state > sound/core/pcm_native.c:1358:38: sparse: incorrect type in argument 3 = (different base types) @@ expected int [signed] state @@ got restrict= ed snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:1358:38: expected int [signed] state > sound/core/pcm_native.c:1358:38: got restricted snd_pcm_state_t [us= ertype] > sound/core/pcm_native.c:1717:38: sparse: incorrect type in argument 2 = (different base types) @@ expected int [signed] state @@ got restrict= ed snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:1717:38: expected int [signed] state > sound/core/pcm_native.c:1717:38: got restricted snd_pcm_state_t [us= ertype] > sound/core/pcm_native.c:1783:61: sparse: incorrect type in argument 2 = (different base types) @@ expected int [signed] state @@ got restrict= ed snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:1783:61: expected int [signed] state > sound/core/pcm_native.c:1783:61: got restricted snd_pcm_state_t [us= ertype] > sound/core/pcm_native.c:1784:63: sparse: incorrect type in argument 2 = (different base types) @@ expected int [signed] state @@ got restrict= ed snd_pcm_state_int [signed] state @@ > sound/core/pcm_native.c:1784:63: expected int [signed] state > sound/core/pcm_native.c:1784:63: got restricted snd_pcm_state_t [us= ertype] > sound/core/pcm_native.c:1801:76: sparse: incorrect type in initializer= (different base types) @@ expected int [signed] new_state @@ got res= tricted snint [signed] new_state @@ > sound/core/pcm_native.c:1801:76: expected int [signed] new_state > sound/core/pcm_native.c:1801:76: got restricted snd_pcm_state_t > sound/core/pcm_native.c:1904:40: sparse: expression using sizeof(void) > sound/core/pcm_native.c:1904:40: sparse: expression using sizeof(void) > sound/core/pcm_native.c:2122:26: sparse: restricted snd_pcm_format_t d= egrades to integer > sound/core/pcm_native.c:2126:54: sparse: incorrect type in argument 1 = (different base types) @@ expected restricted snd_pcm_format_t [usertype= ] format @@ got ricted snd_pcm_format_t [usertype] format @@ > sound/core/pcm_native.c:2126:54: expected restricted snd_pcm_format= _t [usertype] format > sound/core/pcm_native.c:2126:54: got unsigned int [unsigned] [assig= ned] k > sound/core/pcm_native.c:2144:26: sparse: restricted snd_pcm_format_t d= egrades to integer > sound/core/pcm_native.c:2148:54: sparse: incorrect type in argument 1 = (different base types) @@ expected restricted snd_pcm_format_t [usertype= ] format @@ got ricted snd_pcm_format_t [usertype] format @@ > sound/core/pcm_native.c:2148:54: expected restricted snd_pcm_format= _t [usertype] format > sound/core/pcm_native.c:2148:54: got unsigned int [unsigned] [assig= ned] k > sound/core/pcm_native.c:2328:30: sparse: restricted snd_pcm_access_t d= egrades to integer > sound/core/pcm_native.c:2330:30: sparse: restricted snd_pcm_access_t d= egrades to integer > sound/core/pcm_native.c:2333:38: sparse: restricted snd_pcm_access_t d= egrades to integer > sound/core/pcm_native.c:2335:38: sparse: restricted snd_pcm_access_t d= egrades to integer > sound/core/pcm_native.c:2337:38: sparse: restricted snd_pcm_access_t d= egrades to integer > sound/core/pcm_native.c:2347:86: sparse: restricted snd_pcm_subformat_= t degrades to integer > include/sound/pcm.h:1093:47: sparse: cast removes address space of exp= ression > include/sound/pcm.h:1100:47: sparse: cast removes address space of exp= ression > include/sound/pcm.h:1100:47: sparse: cast removes address space of exp= ression > include/sound/pcm.h:1093:47: sparse: cast removes address space of exp= ression > sound/core/pcm_compat.c:241:32: sparse: incorrect type in initializer = (different base types) @@ expected signed int [signed] [usertype] [expli= citly-signed] state @@ got restricted ssigned int [signed] [usertype] [e= xplicitly-signed] state @@ > sound/core/pcm_compat.c:241:32: expected signed int [signed] [usert= ype] [explicitly-signed] state > sound/core/pcm_compat.c:241:32: got restricted snd_pcm_state_t [add= ressable] [assigned] [usertype] state > sound/core/pcm_compat.c:252:42: sparse: incorrect type in initializer = (different base types) @@ expected signed int [signed] [usertype] [expli= citly-signed] suspended_state @@ got restricted ssigned int [signed] [us= ertype] [explicitly-signed] suspended_state @@ > sound/core/pcm_compat.c:252:42: expected signed int [signed] [usert= ype] [explicitly-signed] suspended_state > sound/core/pcm_compat.c:252:42: got restricted snd_pcm_state_t [add= ressable] [assigned] [usertype] suspended_state > include/sound/pcm.h:1093:47: sparse: cast removes address space of exp= ression > include/sound/pcm.h:1100:47: sparse: cast removes address space of exp= ression > sound/core/pcm_compat.c:480:13: sparse: incorrect type in assignment (= different base types) @@ expected signed int [signed] [explicitly-signed= ] __pu_val @@ got restrictesigned int [signed] [explicitly-signed] __pu_= val @@ > sound/core/pcm_compat.c:480:13: expected signed int [signed] [expli= citly-signed] __pu_val > sound/core/pcm_compat.c:480:13: got restricted snd_pcm_state_t [ass= igned] [usertype] state > sound/core/pcm_compat.c:483:13: sparse: incorrect type in assignment (= different base types) @@ expected signed int [signed] [explicitly-signed= ] __pu_val @@ got restrictesigned int [signed] [explicitly-signed] __pu_= val @@ > sound/core/pcm_compat.c:483:13: expected signed int [signed] [expli= citly-signed] __pu_val > sound/core/pcm_compat.c:483:13: got restricted snd_pcm_state_t [ass= igned] [usertype] suspended_state > sound/core/pcm_compat.c:569:13: sparse: incorrect type in assignment (= different base types) @@ expected signed int [signed] [explicitly-signed= ] __pu_val @@ got restrictesigned int [signed] [explicitly-signed] __pu_= val @@ > sound/core/pcm_compat.c:569:13: expected signed int [signed] [expli= citly-signed] __pu_val > sound/core/pcm_compat.c:569:13: got restricted snd_pcm_state_t [ass= igned] [usertype] state > sound/core/pcm_compat.c:572:13: sparse: incorrect type in assignment (= different base types) @@ expected signed int [signed] [explicitly-signed= ] __pu_val @@ got restrictesigned int [signed] [explicitly-signed] __pu_= val @@ > sound/core/pcm_compat.c:572:13: expected signed int [signed] [expli= citly-signed] __pu_val > sound/core/pcm_compat.c:572:13: got restricted snd_pcm_state_t [ass= igned] [usertype] suspended_state > sound/core/pcm_native.c:112:9: sparse: context imbalance in 'snd_pcm_s= tream_lock' - different lock contexts for basic block > sound/core/pcm_native.c:134:28: sparse: context imbalance in 'snd_pcm_= stream_unlock' - unexpected unlock > sound/core/pcm_native.c:1130:52: sparse: context imbalance in 'snd_pcm= _action_group' - unexpected unlock > > vim +995 sound/core/pcm_native.c > > 971 > 972 static int snd_pcm_status_user32(struct snd_pcm_substream *substr= eam, > 973 struct snd_pcm_status32 __user *= _status, > 974 bool ext) > 975 { > 976 struct snd_pcm_status64 status64; > 977 struct snd_pcm_status32 status32; > 978 int res; > 979 > 980 memset(&status64, 0, sizeof(status64)); > 981 memset(&status32, 0, sizeof(status32)); > 982 /* > 983 * with extension, parameters are read/write, > 984 * get audio_tstamp_data from user, > 985 * ignore rest of status structure > 986 */ > 987 if (ext && get_user(status64.audio_tstamp_data, > 988 (u32 __user *)(&_status->audio_tstamp= _data))) > 989 return -EFAULT; > 990 res =3D snd_pcm_status64(substream, &status64); > 991 if (res < 0) > 992 return res; > 993 > 994 status32 =3D (struct snd_pcm_status32) { > > 995 .state =3D status64.state, > 996 .trigger_tstamp_sec =3D status64.trigger_tstamp_s= ec, > 997 .trigger_tstamp_nsec =3D status64.trigger_tstamp_= nsec, > 998 .tstamp_sec =3D status64.tstamp_sec, > 999 .tstamp_nsec =3D status64.tstamp_nsec, > 1000 .appl_ptr =3D status64.appl_ptr, > 1001 .hw_ptr =3D status64.hw_ptr, > 1002 .delay =3D status64.delay, > 1003 .avail =3D status64.avail, > 1004 .avail_max =3D status64.avail_max, > 1005 .overrange =3D status64.overrange, >> 1006 .suspended_state =3D status64.suspended_state, I am not sure for the warning here, we should change 'snd_pcm_state_t' to 's32' for struct snd_pcm_status64? typedef int __bitwise snd_pcm_state_t; --=20 Baolin.wang Best Regards