Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753282AbdF2O2k (ORCPT ); Thu, 29 Jun 2017 10:28:40 -0400 Received: from smtp-out6.electric.net ([192.162.217.189]:58073 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbdF2O2b (ORCPT ); Thu, 29 Jun 2017 10:28:31 -0400 From: David Laight To: "'Al Cooper'" CC: Al Cooper , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Rob Herring , Mark Rutland , Felipe Balbi , yuan linyu , Florian Fainelli , "open list:USB SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "bcm-kernel-feedback-list@broadcom.com" Subject: RE: [PATCH 4/8] usb: bdc: Small code cleanup Thread-Topic: [PATCH 4/8] usb: bdc: Small code cleanup Thread-Index: AQHS73LeTZeMAZhjJEqkI5sdpyP6UKI59OdggABYwoCAAZr3QA== Date: Thu, 29 Jun 2017 14:28:23 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD002DC6D@AcuExch.aculab.com> References: <1498587806-24781-1-git-send-email-alcooperx@gmail.com> <1498587806-24781-5-git-send-email-alcooperx@gmail.com> <063D6719AE5E284EB5DD2968C1650D6DD002C93C@AcuExch.aculab.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v5TESmiY027586 Content-Length: 741 Lines: 22 From: Al Cooper > Sent: 28 June 2017 15:56 > On Wed, Jun 28, 2017 at 4:47 AM, David Laight wrote: > >> > >> temp = bdc_readl(bdc->regs, BDC_BDCSC); > >> if ((temp & BDC_P64) && > >> !dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) { > >> - dev_dbg(bdc->dev, "Using 64-bit address\n"); > >> + dev_dbg(dev, "Using 64-bit address\n"); > >> } else { > >> - ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > >> + ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); > > > > That just wrong... > > Or was wrong before. > > Why is this wrong? It isn't obvious that &pdev->dev is bdc->dev and hence dev. David