From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68AC7C4CEC4 for ; Thu, 19 Sep 2019 09:06:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49B1720644 for ; Thu, 19 Sep 2019 09:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388406AbfISJGM convert rfc822-to-8bit (ORCPT ); Thu, 19 Sep 2019 05:06:12 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46885 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388194AbfISJGM (ORCPT ); Thu, 19 Sep 2019 05:06:12 -0400 Received: by mail-ot1-f65.google.com with SMTP id f21so2369902otl.13; Thu, 19 Sep 2019 02:06:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=wDQS67j3lG7TwomTYu6phRtQVo+Lq0+3xuq57RPV6D8=; b=i1wJ+zoQWcdeFJPKz4EmDzW6m0EliuvcQPuUNzIcZtgWhqgeLwuxiR68NdnizJJDgG IHPXTyhCEax+zzvWHGjCxIvtqGgU9BCCvdqAtXiFQa/z3j/HEtvgt3K6ly6YVkfP02p7 XG/IHq2mXhiRezcDi9JSkPbq5e5LgtF4OiaORJRbq8jpFfZotrNbLkF2dyEzAGF8PQoo k+IxIBy8F3Nl+cGMv3kM9jUafBhQ5We1vZW05zedARE9kUEdpg9BfMuUAMgECwfcWJIz Vy8q8ZQS+AbvbTEqiI4yKqKYeiMseEVTmIOHWGK8GXrN7Zvv88+u0nWNCAJ4hrUJRq2r 8q/g== X-Gm-Message-State: APjAAAVxtZsBodgZQtPUOAh0zuEHBpjmUNADTTEx2ABlB1FrqBAU3SMe xDUY7bonLGG7/oGrjuzKMsKZlpmdcBgdfGvM1bc= X-Google-Smtp-Source: APXvYqzkCVuzCTBNypl4Lg61PDxEIAb1NQVdXkZR4+Hm131qcRPrUobeyAbVKE3pL8YI02rUdNiF6OshW6FylYOc9ac= X-Received: by 2002:a9d:4d0d:: with SMTP id n13mr5907611otf.297.1568883971244; Thu, 19 Sep 2019 02:06:11 -0700 (PDT) MIME-Version: 1.0 References: <20190731.094150.851749535529247096.davem@davemloft.net> <20190731185023.20954-1-natechancellor@gmail.com> <64f7ef68-c373-5ff5-ff6d-8a7ce0e30798@infradead.org> In-Reply-To: <64f7ef68-c373-5ff5-ff6d-8a7ce0e30798@infradead.org> From: Geert Uytterhoeven Date: Thu, 19 Sep 2019 11:06:00 +0200 Message-ID: Subject: Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning To: Randy Dunlap Cc: Nathan Chancellor , "David S. Miller" , driverdevel , Andrew Lunn , Florian Fainelli , kbuild test robot , kernel-build-reports@lists.linaro.org, Greg KH , Matthew Wilcox , Mark Brown , Linux-Next , netdev , Linux ARM , Heiner Kallweit Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Aug 1, 2019 at 1:52 AM Randy Dunlap wrote: > However, there are lots of type/cast warnings in both mdio-octeon and mdio-cavium: > > ../drivers/net/phy/mdio-octeon.c: In function ‘octeon_mdiobus_probe’: > ../drivers/net/phy/mdio-octeon.c:48:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > (u64)devm_ioremap(&pdev->dev, mdio_phys, regsize); > ^ cavium_mdiobus.register_base should be "void __iomem *" instead of "u64", and the cast should be dropped. > In file included from ../drivers/net/phy/mdio-octeon.c:14:0: > ../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) > ^ ... which allows to drop this cast as well. Casts are evil, and usually a sign that you're doing something wrong. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds