Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3391642ybn; Fri, 27 Sep 2019 05:48:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwg5Ww6ceUCXU7v9mel47hw1Y4gOAwKy5wwC+9VQ1xAO8WXa+ddHay54ttNDIVnIOT98zJ5 X-Received: by 2002:a17:906:ce46:: with SMTP id se6mr7640048ejb.198.1569588516267; Fri, 27 Sep 2019 05:48:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569588516; cv=none; d=google.com; s=arc-20160816; b=Bb70QMNgl+QOEK3pfunTw0C8Jl+X0Kc41CDMhwsURKxB1MwaIXzH23HB3Ak+TIw9eL G5Ksvz32zt2/Trg2Vdn0O4pPo1+1Oz/b95jigAjFp9QOOxoroFbsk0wDX3Jgbnu9CCVL R0bLoFy4+0MQprvFXEDs04JOsmMf/eZq0zaABTExBE8Bbn53XSOthiuphiQtOlnjyOUp 9Hb554ayIXbvG7PlTvx2Iv+RyINjedEFUXN9uIpvNt0harEPzmju9FbbMONO76zBnhqr huT8vYQralqDMe+P61JxXjVdmUlsq/W88MR0toU3ubuaq7iLzi3v9h9btS8mdFRuH3qw UP7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=XdHj9CUIRn1bgsM+6mBPRINoGvRqefaGdJ7HyQ7uQQk=; b=fqWth3tWYiFdP+Th3C3AkVo0ZkZPHq1KBYne3mxcZVpZTFIQ6NsnZkGc2Rf2f2GO0q mt5feb+uMLR6qb/GSLafvmtEcR6FLziVmxPiAjVTJno4SmvgDqmG8EE40n/a/5SRaKl1 kCg7ffiAoKslNgjgNZRee+MaLULca6ZeSYquSfy9ZhZ1CJde7pgGJ9Z0hsteqOOAz2ku SsYXVet36in8UczMlDzse2ot5txKRhHtEjEtY3OTfflBx7L5Rzej1jO7U6Yw1rC5uebL oC41C/hm6rGzgZk/ww7h4wZRLkZKgehy8V4ikcGgXyXz23+b5/iZMSuUghLk+XdOGSYb nIaQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si1506146edi.326.2019.09.27.05.48.11; Fri, 27 Sep 2019 05:48:36 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727482AbfI0Mpy (ORCPT + 99 others); Fri, 27 Sep 2019 08:45:54 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:38105 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725992AbfI0Mpy (ORCPT ); Fri, 27 Sep 2019 08:45:54 -0400 Received: by mail-ot1-f66.google.com with SMTP id e11so2107061otl.5 for ; Fri, 27 Sep 2019 05:45:54 -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; bh=XdHj9CUIRn1bgsM+6mBPRINoGvRqefaGdJ7HyQ7uQQk=; b=rfavjP3FyCp8sIuks9Q0WcRue6lFb+bbuOh2JBIAzbjWjlUJT885DhSGHGMolkBVuD 3U+XNv2gcbCVg85+xbT+Oy4sSgBHicufVANEkkmnZhJBk/eA0rmqnMPrbqErLEyj0SrL kyRpYiCf6/DH4UQzXj3jfJGuxu0IO1tXGH8MLRTjXwSqbcSOEbkYW1GBliXDgt4snDUH qxbwNfZD84+cgLqmDl2mGTBLjYnVLYAClAT5XplbikTcuK+uO8b4Es071Ur/kquDLayu bHy09j4CI4oFSlkBK1i1Q4uK5NksNzkkqqnaPt7DZHXhO7i893n8zZPI/FcZBEjevifS jf6g== X-Gm-Message-State: APjAAAVkV1maQGkqwFXVdn3kthtIPEowNJKFqtz734Uue0rTb+s88/Rk m+bFdZSQSwagyBo+hR6ADXkBj/SheWhtyRXYkKnJ1w== X-Received: by 2002:a9d:17e6:: with SMTP id j93mr3103258otj.297.1569588353689; Fri, 27 Sep 2019 05:45:53 -0700 (PDT) MIME-Version: 1.0 References: <1503819148-11676-1-git-send-email-himanshujha199640@gmail.com> In-Reply-To: <1503819148-11676-1-git-send-email-himanshujha199640@gmail.com> From: Geert Uytterhoeven Date: Fri, 27 Sep 2019 14:45:42 +0200 Message-ID: Subject: Re: [PATCH] nubus: remove cast to void pointer To: Himanshu Jha Cc: Finn Thain , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Himanshu, On Sun, Aug 27, 2017 at 9:33 AM Himanshu Jha wrote: > Casting void pointers to other pointer types in unnecessary. > > Signed-off-by: Himanshu Jha Thanks for your patch! > --- a/drivers/nubus/nubus.c > +++ b/drivers/nubus/nubus.c > @@ -167,7 +167,7 @@ static unsigned char *nubus_dirptr(const struct nubus_dirent *nd) > void nubus_get_rsrc_mem(void *dest, const struct nubus_dirent *dirent, > int len) > { > - unsigned char *t = (unsigned char *)dest; > + unsigned char *t = dest; > unsigned char *p = nubus_dirptr(dirent); > > while (len) { > @@ -180,7 +180,7 @@ EXPORT_SYMBOL(nubus_get_rsrc_mem); > void nubus_get_rsrc_str(void *dest, const struct nubus_dirent *dirent, > int len) > { > - unsigned char *t = (unsigned char *)dest; > + unsigned char *t = dest; > unsigned char *p = nubus_dirptr(dirent); > > while (len) { The second chunk is no longer valid, but the first one still is. Reviewed-by: Geert Uytterhoeven i.e. will queue the first chunk for v5.5. 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