Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1504538pxj; Fri, 21 May 2021 16:32:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcgJ/FS6gi5CyNDrG3Z+s5Gb5ei+2LtubNXyX3MRHiR66PpfPTah76IK7YYUiVTrZQ+y3C X-Received: by 2002:a92:c846:: with SMTP id b6mr1577769ilq.196.1621639937544; Fri, 21 May 2021 16:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621639937; cv=none; d=google.com; s=arc-20160816; b=d5/GvSTZJ+yxcWUCjzb11Y4Etg0jsPdtGOnAvcayjMsE6MTZ6G2ijRh7wUe/iRXGBk K6iWbToefyjJC4VYGwaHHYpWQet6erqG3MlDqD7wiNDg83HJTqLa4DGUy16+6qjt1Kbx ZSUawUXvC0wDOfu1wYomUdQaGTZO4eI8NklwoeuOSx6RSj9yk6JM6mDDfn4tsx1I/ufp VxSVqlxDyAX6+UNZ3dhSdPjhmrbHFP8OkJz8f/rRWeZ64KbTo4KhJrvfsCs+SGzc2LB4 lOOmB12HOi/zFnY4gpJaeQhkA6vtbAZv+kg++VEM+NQ2Uqdib47B+Jo9csbJ0x6h1g7a kRPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=axtOd7tLsrXtbfiwzaZghJQ3ag4GZSs8yl21ItFm8us=; b=w+oefBoNAARkdYrAyNYpg4mdWc6IL94pzFSjjV8hPl+fsd1CPGuyQUlsUjWZmsRJBW odFDz/O3N6/qynxHO6OJtLtEqKi4+78GCB9BX8yazjWIV8H+vtLPorfhtiD10VM7TsQv lzWoyOgpAJ+u6tSpBON9fREBMIriegSPAoDr1EkVqJ+7EQyqv+/x2nBEpUi6CajnkBA0 ynVVpMP8eCDNFf21rhQx2BZ8s9q/OQ6n03UKjhO93FQijaRrNx6CL1FB84nHS5DA5xIb Jjdui+bdmEVBzYiSOcXfPQogDznzFXOnfLvwp05p394fUgrxySLW2JZt9s7Tufnm9RCz 5+lA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si8091407iot.35.2021.05.21.16.32.04; Fri, 21 May 2021 16:32:17 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230111AbhEUXc2 (ORCPT + 99 others); Fri, 21 May 2021 19:32:28 -0400 Received: from mail-ej1-f45.google.com ([209.85.218.45]:40710 "EHLO mail-ej1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbhEUXc1 (ORCPT ); Fri, 21 May 2021 19:32:27 -0400 Received: by mail-ej1-f45.google.com with SMTP id n2so32742877ejy.7; Fri, 21 May 2021 16:31:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=axtOd7tLsrXtbfiwzaZghJQ3ag4GZSs8yl21ItFm8us=; b=tNtUCKSFob5JRNTf6q3XyGIznK4rrtouB3a9mQT+r15zHuwFotB8Sup0anlL0zGv7P YJ1b2Wt35wdYWyYvaonmmZ0/69ceTJQJyTbTN+keCIWLIjJX4rpz/jPWn99Y9GI08edm IcybGtEpPAtZPRdqTqCOY7ezuIDH9sp+Hkzob9DHPmjLkKoo4a05KQeelLgknSgg459f 8Nap3Z2NmkHK8+lQRNm0Q+24/yOnk5zJ4XnwXT0Pe9bsO9ltZBoUukgvEzkwV05JDWbg PhVn5atpOf/q+7cr4FWSqBnhZ9i06Ds+BvZT9sKiPaBQGhql4XQDVQ4fMcnw8u5exWiI LbCw== X-Gm-Message-State: AOAM532uriOTABtQ/EUsqzJbxCoTFYRQPatcQqyhz4kH657o4cSUuJ/Q 0pEqAZTw06zDCSObrzoks30= X-Received: by 2002:a17:906:f0cd:: with SMTP id dk13mr12536110ejb.11.1621639861994; Fri, 21 May 2021 16:31:01 -0700 (PDT) Received: from rocinante.localdomain ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id k9sm5374156edv.69.2021.05.21.16.31.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 16:31:01 -0700 (PDT) Date: Sat, 22 May 2021 01:31:00 +0200 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Shradha Todi Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, lorenzo.pieralisi@arm.com, robh@kernel.org, bhelgaas@google.com, pankaj.dubey@samsung.com, p.rajanbabu@samsung.com, hari.tv@samsung.com, niyas.ahmed@samsung.com, l.mehra@samsung.com Subject: Re: [PATCH 1/3] PCI: dwc: Add support for vendor specific capability search Message-ID: <20210521233100.GB79835@rocinante.localdomain> References: <20210518174618.42089-1-shradha.t@samsung.com> <20210518174618.42089-2-shradha.t@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210518174618.42089-2-shradha.t@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shradha, [...] > +u16 dw_pcie_find_vsec_capability(struct dw_pcie *pci, u8 vsec_cap) > +{ > + u16 vsec = 0; > + u32 header; > + > + while ((vsec = dw_pcie_find_next_ext_capability(pci, vsec, > + PCI_EXT_CAP_ID_VNDR))) { > + header = dw_pcie_readl_dbi(pci, vsec + PCI_VNDR_HEADER); > + if (PCI_VNDR_HEADER_ID(header) == vsec_cap) > + return vsec; > + } > + > + return 0; > +} > +EXPORT_SYMBOL_GPL(dw_pcie_find_vsec_capability); A small question as I am curious: why not use pci_find_vsec_capability() here? The implementation looks very similar, which is why I am asking, but it might be that I am missing something, and for that I apologise in advance. Krzysztof