Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1519815img; Wed, 27 Feb 2019 00:19:15 -0800 (PST) X-Google-Smtp-Source: AHgI3IbbpK1/H2bUczvB6rNSSen0Mlf6KWBNsdrSr8KEGxQFz4GgQuyRiZC033D9NOlBrqhgzMZv X-Received: by 2002:a63:c04e:: with SMTP id z14mr1813128pgi.20.1551255555440; Wed, 27 Feb 2019 00:19:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551255555; cv=none; d=google.com; s=arc-20160816; b=po9g1phJX24s177/Qq6UhmAzP42nrEB4w1r5ecZPvXJAe4j3ZnRDEqCaAweshVa1ts NaOwn54fUy3/uociS9AmcxbJU7NvIEiH+/6eqPyqHUEWMTa4ERlcNPBJd6fKGGhUD8+z /AWNfva8UQlZayAawHtlQHNP4vAI5CUArBsm1CMoqUPSvxyRQgpFIaR3eVTGt85U/MVu zdEYMUQhQwC7209kYe/gMgdp+nMWiZpMUfYX69bAKK6Ql6rcJMDZK1g5kxnYbv5PYsc3 TA/fXZw3ZCXXHkj52gmH3AWABsFnWyWHVdJKNPai1FU37Vx5hPT6hM0+HMF76U5cAbLU LsNA== 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:message-id :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject; bh=dS8wse3rfaZ3MwFAjNvpo2nmM+mPAhAXaIjbX8KbaCw=; b=hpbN+58PrrnlQlk9C9rB1WU6J8RKVXhOX5bgqFaMTscoDRQaVEoLylngiZa8pufnEc c4SJJ60l7gSe58KwRt4TFgwtsGazPL97lP1E5jTxBg9Xtb4LDy3qQjBhUeUa1T79PnqU pi44QTk6Q7LVQEUefmclUZbchs8T4CJuOBIYzAbdAdMQbShT3guf0lXdDqPY2Rpvmril HRJYQh9xpf1Nb53BHeGajsYBSDyE31XBu7+CZoDX4vgawiOkLzbZzsPFEwV/kQPe3Ird WHaIp+6V5oTyLnRGFyFXtsp770cNZpmaFzH37CUzpVKZhfNrG7Q0viv8UOi+FBYPy+QU eF5g== 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 i17si14367837pgk.233.2019.02.27.00.19.00; Wed, 27 Feb 2019 00:19:15 -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 S1729658AbfB0ISU (ORCPT + 99 others); Wed, 27 Feb 2019 03:18:20 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59706 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbfB0IST (ORCPT ); Wed, 27 Feb 2019 03:18:19 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1R85Cp7014064 for ; Wed, 27 Feb 2019 03:18:18 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qwms2pj73-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 27 Feb 2019 03:18:18 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Feb 2019 08:18:15 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp01.uk.ibm.com (192.168.101.131) 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 08:18:12 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1R8IBhw31653972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Feb 2019 08:18:11 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8057F5204F; Wed, 27 Feb 2019 08:18:11 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 2CC365205A; Wed, 27 Feb 2019 08:18:11 +0000 (GMT) Received: from [9.102.32.74] (unknown [9.102.32.74]) (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 6B845A0243; Wed, 27 Feb 2019 19:18:09 +1100 (AEDT) Subject: Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link 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 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> From: Andrew Donnellan Date: Wed, 27 Feb 2019 19:18:08 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <158101d4ce73$11ff4550$35fdcff0$@d-silva.org> Content-Language: en-AU X-TM-AS-GCONF: 00 x-cbid: 19022708-4275-0000-0000-000003148120 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19022708-4276-0000-0000-00003822C30C Message-Id: <97ad5218-4876-956e-e6ef-fb3449eca68e@au1.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-27_06:,, 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-1902270055 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnellan@au1.ibm.com IBM Australia Limited