Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1500909ybt; Thu, 18 Jun 2020 10:07:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNljBt0RnjlR/lwDsg1U5MKfcV/7sbKz+Gi8u+tTd3+JE5nUiRp6kO/pFJyqEvCILHd/1Y X-Received: by 2002:a17:906:f203:: with SMTP id gt3mr5162593ejb.77.1592500022739; Thu, 18 Jun 2020 10:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592500022; cv=none; d=google.com; s=arc-20160816; b=jBUlvRPANXCUKHzU2E6kC1gH8VuKXDH9ob1a3TDoGuX1BS4Dv7ejsxAKMrUBwdUFvT CAiNHFUQ7oHMCbOqNhgebXcPnLY+wJLiL13psHueZFZq5pLa1KP4PO+YfpezXEaWcIkt xIkQtXZ7gS5YcUszF68RZS1mr/aEyDzek/b2JeLXoaVOuvPm2LWXfs+Zo5lpuvRJCPB2 Q1Lw9nUgRLff2j1b0btNLZ3RY9CZFMIs3VPvGQ5mDXINxXbOhmieMxBpDj3RbA8tvms9 0Ip1ZvFva8rbVZpcSxjNZb94u4w2yw6Ma+VwVVeis8QVmKV4DwzGuIb1wiaWY05oPbRV y9Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=FX6+2p7ArY6D7s/7xvHuBDs0wrFGqKlmJFSsEr7UPBY=; b=Cb0aSClkQId02V5QKtr6ZvXd+nq0Nzs0nDs2s3x+0Hk+inYQ5Kj6HwxKdw2ubcmjB1 MrnSTA5TG7XF0S93pZVjJdpQP6uNLm/yzVfZRYWfFhdPEkW+U6Nu7+jWLK2tGm42kZY+ eTodNspc6fKqh2QUM/nXPv+kzlplSN/GunqllNYiF61KLPJYg7wluG+TRpcwl0DnI4kT JuDYjOXjvsc+OD6eVlbk/+0XCfUIEj0JFWmvrddr+k+3YUwnLyDx7jUTcqSzUFKj7EOQ cgr+P+WAH8jpmNktz8T6nbkpjGXwO8QVLryjlYyQEfs/TldwCPsnGuFTjk0JWKTM0jvo V/KQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n23si2222140edq.264.2020.06.18.10.06.39; Thu, 18 Jun 2020 10:07:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731992AbgFRREU (ORCPT + 99 others); Thu, 18 Jun 2020 13:04:20 -0400 Received: from mga12.intel.com ([192.55.52.136]:18911 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728080AbgFRRES (ORCPT ); Thu, 18 Jun 2020 13:04:18 -0400 IronPort-SDR: mJudlzBy5CgBteVYjBUp+ZaWnr0SOaMW0S2BhPzrM7x1XzJDmkKgRsvTU78pWtT289PU/xwFYy KQmyaGCrDqPQ== X-IronPort-AV: E=McAfee;i="6000,8403,9656"; a="122411240" X-IronPort-AV: E=Sophos;i="5.75,251,1589266800"; d="scan'208";a="122411240" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 10:04:18 -0700 IronPort-SDR: 2gUCSVXlX5ylAJVF4QwcE0B9MofR7qkp80j9DIU+dI0X1ei5sbxmeZ1zAqvFyEzMz4Moemxtf1 uv4bSt5vJbzw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,251,1589266800"; d="scan'208";a="309176337" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 18 Jun 2020 10:04:13 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1jlxxX-00EJAf-Ne; Thu, 18 Jun 2020 20:04:15 +0300 Date: Thu, 18 Jun 2020 20:04:15 +0300 From: Andy Shevchenko To: Shiju Jose Cc: "linux-acpi@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "rjw@rjwysocki.net" , "helgaas@kernel.org" , "bp@alien8.de" , "james.morse@arm.com" , "lenb@kernel.org" , "tony.luck@intel.com" , "dan.carpenter@oracle.com" , "zhangliguang@linux.alibaba.com" , "Wangkefeng (OS Kernel Lab)" , "jroedel@suse.de" , Linuxarm , yangyicong , Jonathan Cameron , tanxiaofei Subject: Re: [PATCH v10 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe controller errors Message-ID: <20200618170415.GY2428291@smile.fi.intel.com> References: <20200618154051.639-3-shiju.jose@huawei.com> <20200618155627.GX2428291@smile.fi.intel.com> <761e579035d346bf8cce2dfc6857587c@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <761e579035d346bf8cce2dfc6857587c@huawei.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 18, 2020 at 04:35:31PM +0000, Shiju Jose wrote: > >-----Original Message----- > >From: Andy Shevchenko [mailto:andriy.shevchenko@linux.intel.com] > >Sent: 18 June 2020 16:56 > >To: Shiju Jose > >Cc: linux-acpi@vger.kernel.org; linux-pci@vger.kernel.org; linux- > >kernel@vger.kernel.org; rjw@rjwysocki.net; helgaas@kernel.org; > >bp@alien8.de; james.morse@arm.com; lenb@kernel.org; > >tony.luck@intel.com; dan.carpenter@oracle.com; > >zhangliguang@linux.alibaba.com; Wangkefeng (OS Kernel Lab) > >; jroedel@suse.de; Linuxarm > >; yangyicong ; Jonathan > >Cameron ; tanxiaofei > > > >Subject: Re: [PATCH v10 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe > >controller errors > > > >On Thu, Jun 18, 2020 at 04:40:51PM +0100, Shiju Jose wrote: ... > >> Reviewed-by: Andy Shevchenko > > > >Hmm... Did I give a tag? Yes, and please, be sure that you got explicit tags from reviewers. ... > >> + for_each_set_bit_from(idx, (const unsigned long *)&edata->val_bits, > > > >Can't you make val_bits unsigned long? Because this casting is incorrect. > >Otherwise, make a local copy into unsigned long variable. > > The data val_bits in the error record is 64 bits, thus used u64. > Casting is added because of a compilation warning on _find_nex_bit_ function as it > expects the type of the address as const unsigned long*. > Probably I will make local copy of val_bits into unsigned long variable. I see. So, something like this: unsigned long bits[] = { BITMAP_FROM_U64(edata->val_bits) }; ... for_each_set_bit_from(i, bits, ...) ... looks plausible. Or if you have better idea... -- With Best Regards, Andy Shevchenko