Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1803792img; Wed, 27 Feb 2019 05:47:54 -0800 (PST) X-Google-Smtp-Source: AHgI3IblkLwo+egcoWN1QdPaOhHrq3JuyjQOOLQnGEz7F6KCGile7oxv8+59LrWJ+AvByQTzzH/d X-Received: by 2002:a62:f20d:: with SMTP id m13mr1723200pfh.174.1551275274792; Wed, 27 Feb 2019 05:47:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551275274; cv=none; d=google.com; s=arc-20160816; b=AcCm/AaTupJFrcCy0Pvckq7D1sC7Uvv2x/OD9gVB6p80HRyFh/ArewzHzNzo/Zh/Av gFypV64ddADK12NCNl15caayxfr6rx392fdP7/5XXfKZlymA35D45UrhKXKqnK3zvRbF lA3qxEIxk7rUMMAx4pUJ9A2FUlB70YMSFPIbcoxm1Ve4IU3utAnljqACyDVntY3Nfa2m TD4nPM5G1eO5/dpQlUjt1/E5uuX+8vk0WlNZWiPZXwhyG3XaBpESqmoBTbMM39FB+aFE VqPuzjzKkvz/Wm/sQyM6yhUA//uQ+FXREgzPjYbh81LpWKEs6MPU0EQRkp9I0rVG5Fv1 7Lmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=zSrDdjKm6BQmwh60bT/7gomMthtbctKOKavTMUXJzjY=; b=KpyANgOJ5BsU2gK16T6r902D/fn8RDYiuJUlw6tE/Y9ofqeS8CdHOLVPJCV+FfZ/yc CzpwjzYkavVyVmkV3aYiJ30HE4mSAxbcijp0/jY3b/KrWLo6qbvWI7+jeBxsdcUBQFMJ V24PTSVYu0CjAzf53MdSRSWvgIGyIf3h/qjFp+WGfAv7uyyXRyucjxq6q+r/c1o6Esu1 Ih3+3KNCSYaMLTLWPF0WqlXPgcviC2ghLfY1UzuA2d0Jsf7KgmDIetsj+ZyQCSMh8sD6 y59XoTQ6N13erzxLbjgIEN62NQgOE+ZKOkIVsapyhVLaQMGnVo9OaEeB+W60kfjttoQj aPpQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si13575724pgg.215.2019.02.27.05.47.38; Wed, 27 Feb 2019 05:47:54 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730480AbfB0Np4 (ORCPT + 99 others); Wed, 27 Feb 2019 08:45:56 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60938 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730166AbfB0Npy (ORCPT ); Wed, 27 Feb 2019 08:45:54 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1RDbiP1083648 for ; Wed, 27 Feb 2019 08:45:53 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qwtpdkc9c-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 27 Feb 2019 08:45:53 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Feb 2019 13:45:50 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 27 Feb 2019 13:45:47 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1RDjjcH43384990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 27 Feb 2019 13:45:45 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9EAA942047; Wed, 27 Feb 2019 13:45:45 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1933442054; Wed, 27 Feb 2019 13:45:45 +0000 (GMT) Received: from [9.145.24.93] (unknown [9.145.24.93]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 27 Feb 2019 13:45:45 +0000 (GMT) Subject: Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link To: Andrew Donnellan , "Alastair D'Silva" , "'Alastair D'Silva'" Cc: "'Greg Kurz'" , "'Arnd Bergmann'" , "'Greg Kroah-Hartman'" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20190227045741.21412-1-alastair@au1.ibm.com> <20190227045741.21412-2-alastair@au1.ibm.com> <8c0300fc-4319-bd66-a47e-4ffda6ac795c@au1.ibm.com> <156e01d4ce6e$ee42d9f0$cac88dd0$@d-silva.org> <158101d4ce73$11ff4550$35fdcff0$@d-silva.org> <97ad5218-4876-956e-e6ef-fb3449eca68e@au1.ibm.com> From: Frederic Barrat Date: Wed, 27 Feb 2019 14:45:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <97ad5218-4876-956e-e6ef-fb3449eca68e@au1.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19022713-0016-0000-0000-0000025B92BD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19022713-0017-0000-0000-000032B5FADA Message-Id: <13209edc-d027-4d2f-668b-ad969a25eb06@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-27_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902270091 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 27/02/2019 à 09:18, Andrew Donnellan a écrit : > On 27/2/19 7:04 pm, Alastair D'Silva wrote: >>> -----Original Message----- >>> From: Andrew Donnellan >>> Sent: Wednesday, 27 February 2019 6:55 PM >>> To: Alastair D'Silva ; 'Alastair D'Silva' >>> >>> Cc: 'Greg Kurz' ; 'Frederic Barrat' >>> ; 'Arnd Bergmann' ; 'Greg Kroah- >>> Hartman' ; linuxppc-dev@lists.ozlabs.org; >>> linux-kernel@vger.kernel.org >>> Subject: Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link >>> >>> On 27/2/19 6:34 pm, Alastair D'Silva wrote:>>> diff --git >>> a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c index >>>>>> e6a607488f8a..16eb8a60d5c7 100644 >>>>>> --- a/drivers/misc/ocxl/file.c >>>>>> +++ b/drivers/misc/ocxl/file.c >>>>>> @@ -152,7 +152,7 @@ static long afu_ioctl_enable_p9_wait(struct >>>>>> ocxl_context *ctx, >>>>>> >>>>>>             if (status == ATTACHED) { >>>>>>                 int rc; >>>>>> -            struct link *link = ctx->afu->fn->link; >>>>>> +            void *link = ctx->afu->fn->link; >>>>> >>>>> This doesn't look like a rename... >>>> >>>> That corrects the type to what the member (and prototype for >>> ocxl_link_update_pe) declare it as. >>>> >>>> The struct link there is bogus, it shouldn't even compile (since the >>>> intended >>> struct link is defined in a different compilation unit), but instead >>> picks up a >>> different definition of 'struct link' from elsewhere. >>>> >>> >>> Given there's only a handful of struct links defined across the >>> entire kernel, >>> I'm going to guess that the definition it's picking up is in fact the >>> ocxl one. >>> >> >> Unlikely, since that's never in a header. It wasn't caught since it >> was assigned to/from a void*. > > Ah, yeah that'd explain it... and it's a pointer so it never needs to > know its size. I'm clearly not very good at C. > >> >>> I think the better solution here is to move struct ocxl_link into >>> ocxl_internal.h, change ocxl_fn::link to be struct ocxl_link * rather >>> than void >>> *, and update the function signature for ocxl_link_update_pe() as well. >> Not move it, but we could have an opaque declaration there. >> > > Putting it there would fit with all the other ocxl_* structs, but either > way, we definitely need a declaration in there and get rid of the void*, t Mmm, it might turn out to be more invasive that planned... The point was only to have it as an opaque to the outside world, for APIs we'd like to deprecate at some point, so I wouldn't sweat too much over it. Fred