From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932562AbcFNVBn (ORCPT ); Tue, 14 Jun 2016 17:01:43 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:36706 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752184AbcFNVBm (ORCPT ); Tue, 14 Jun 2016 17:01:42 -0400 From: Vivien Didelot To: Sergei Shtylyov , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn , Florian Fainelli Subject: Re: [PATCH v2 net-next v2 08/12] net: dsa: mv88e6xxx: read switch ID from info In-Reply-To: References: <20160614183153.32327-1-vivien.didelot@savoirfairelinux.com> <20160614183153.32327-9-vivien.didelot@savoirfairelinux.com> User-Agent: Notmuch/0.22 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) Date: Tue, 14 Jun 2016 17:01:38 -0400 Message-ID: <87k2hrbi31.fsf@ketchup.mtl.sfl> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Sergei Shtylyov writes: >> - id = mv88e6xxx_reg_read(ps, REG_PORT(0), PORT_SWITCH_ID); >> + of_id = of_match_node(mv88e6xxx_of_id_table, np); > > You could use of_device_get_match_data() here. > >> + if (!of_id) >> + return -EINVAL; >> + >> + info = (const struct mv88e6xxx_info *)of_id->data; > > Pointer casts from 'void *' are automatic. I applied your comments and also squashed patches 7 and 8 together. I'll respin a v3 soon unless there are other comments. Thanks, Vivien