Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp751736ybg; Thu, 19 Mar 2020 08:08:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtb1sRYwQLJnWr41LTT9aVShfRdQWho1UnXW1gUExim4b88AY7gGaIdrVDPmKpPO01i3k6O X-Received: by 2002:aca:db41:: with SMTP id s62mr2583641oig.87.1584630530903; Thu, 19 Mar 2020 08:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584630530; cv=none; d=google.com; s=arc-20160816; b=Mp36BE8adFtW2PNz1Cx4h+gOWwl290r+mUGkpnryb3lBisbfezfHllI2PJwAywCaU/ +hqI8ALeTin/nZy1uIpbH3V1e7IGeX6jQYYGFt4Ta8Q21hpNMyFmsthqD5h0n4e8la5A rg52f1u14aBIdatSb+/4rPNpTsIwFIwlVxbp8DE03hQC5nduO6JuOjtbZ5LFllUvYuOd +CV5XBS+xQ/OpNDx27rffY4MG2qIPWjqrMGaAPi/pCD0fwGbl7QG7REsG1kKiqV4BnCA dx8pDcg7x7MMxROJiRpAEfAR+0JjpdOOSEysx7AAs1TtcwYU1ZE8Sanv8T6qvD7NYsZK 4gfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=tEtZwW7IpOSLSvQnsgQ8J66cJvp62R3ApNSmRuGT2WQ=; b=MOSKoEbWsHVIeSGJX7smxlXJPuzCvYNP50ROPdcrOt9v1y4fRzxOakBkIRC3d399vs xSVq7AulNbkCgO8OJpOr/l6viDD6VZr9D8MJ/eW2vdNI+dSdXGU0D2EHpJfcQm64AERG SZb05C0K9ThN0HeeypGIb+5Gu5hmxcZMg1/OAVm2Ojnt1YapR3ltzVzxYAYPNU7Cvd/M cyw5E2fLi4DMQfUbKha6l54uX1n0tAc9WgrJBUVa7kSH7+qjf+YCG6kE47Wr3eazswme k9WdT9QeWAUBlXMp0yFRm0kP06vHjFk2NTuxJwcuf7C01ZOamskkcXegL/OGJcpt8JTF iagg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b="O/4NOfJO"; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q19si1378444otk.11.2020.03.19.08.08.22; Thu, 19 Mar 2020 08:08:50 -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=@oracle.com header.s=corp-2020-01-29 header.b="O/4NOfJO"; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727001AbgCSPHc (ORCPT + 99 others); Thu, 19 Mar 2020 11:07:32 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:55468 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728037AbgCSPHb (ORCPT ); Thu, 19 Mar 2020 11:07:31 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02JEwwgE124196; Thu, 19 Mar 2020 15:07:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=tEtZwW7IpOSLSvQnsgQ8J66cJvp62R3ApNSmRuGT2WQ=; b=O/4NOfJOo9aAmZNgtfpBkmebfoNeXdUSGWKDSaPJAG2VVWaDHsbfaIhyeVNcHjoK94Kv OJ98WJEs3tcFgvQmtSIaYPkvApBpXGGI9LX/PaHYLkbukt8og1hjbj/ZAvZNmUi7m6Y+ sP+s1zfx6uf2OSSOylP3PX2Tp/tCrrH+fjK8QLXeuDl6xVUoJcdu4v3ph9B8VhoMnSEV jBsmMnJtwjV7gfqVKVfx5njwf5zRz0JgH498L94OKhJoGk01lcqAvzk7clAudGyhjpGs xidrCBNirB0N0ATxPYMXBWOJ2pBZQyvJvp6rAjKnz8Jct1cVVdLlFsUx64sdacYkz+65 1g== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2yrpprgwf7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Mar 2020 15:07:16 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02JEv5tt185228; Thu, 19 Mar 2020 15:07:16 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2ys8tw5xt5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Mar 2020 15:07:15 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 02JF7EUX002914; Thu, 19 Mar 2020 15:07:14 GMT Received: from [10.39.245.129] (/10.39.245.129) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Mar 2020 08:07:14 -0700 Subject: Re: [PATCH] xen-pciback: fix INTERRUPT_TYPE_* defines To: =?UTF-8?Q?Marek_Marczykowski-G=c3=b3recki?= , xen-devel@lists.xenproject.org Cc: Juergen Gross , Stefano Stabellini , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Simon Gaiser , open list References: <20200319040648.10396-1-marmarek@invisiblethingslab.com> From: Boris Ostrovsky Message-ID: Date: Thu, 19 Mar 2020 11:07:13 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200319040648.10396-1-marmarek@invisiblethingslab.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9564 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxscore=0 malwarescore=0 suspectscore=0 mlxlogscore=847 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003190067 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9564 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 clxscore=1011 impostorscore=0 priorityscore=1501 spamscore=0 mlxlogscore=912 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003190067 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/19/20 12:06 AM, Marek Marczykowski-Górecki wrote: > INTERRUPT_TYPE_NONE should be 0, Would   return ret ?: INTERRUPT_TYPE_NONE in xen_pcibk_get_interrupt_type() work? I think it's better not to tie macro name to a particular value. -boris > as it is assumed in > xen_pcibk_get_interrupt_type(). Fix the definition, and also shift other > values to not leave holes. > But also use INTERRUPT_TYPE_NONE in xen_pcibk_get_interrupt_type() to > avoid similar confusions in the future. > > Fixes: 476878e4b2be ("xen-pciback: optionally allow interrupt enable flag writes") > Signed-off-by: Marek Marczykowski-Górecki > >