All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>, linux-can@vger.kernel.org
Cc: kernel@pengutronix.de
Subject: Re: [00/14] can: cleanup of af_can/raw + simplifying of ndev->ml_priv handling
Date: Thu, 17 Aug 2017 15:02:00 +0200	[thread overview]
Message-ID: <7d2b8653-1706-61de-6bb7-7198087dca20@pengutronix.de> (raw)
In-Reply-To: <61b043fa-311c-dd8c-404c-65adcf8e987b@hartkopp.net>


[-- Attachment #1.1: Type: text/plain, Size: 1164 bytes --]

On 08/17/2017 02:57 PM, Oliver Hartkopp wrote:
> Hi Marc,
> 
> On 08/17/2017 01:57 PM, Marc Kleine-Budde wrote:
> 
>>
>> Have you found some time to look at these issues?
>>
> 
> I'm going through the code just now ;-)
> 
> One question:
> 
> All the midlayer private stuff was also done to cleanly separate the 
> network layer stuff in net/can from the driver layer stuff in 
> drivers/net/can.
> 
> Now you introduce a network layer data structure into the driver layer.
> I'm not against this - and in fact I can see a bunch of advantages and 
> simplifications as you intended.

> But do you think it's a proper approach from the perspective of layer 
> separation?

No. Another approach is keep the memory allocation in the
NETDEV_REGISTER hook, but refuse to start the netdev with NOTIFY_DONE.
Then we can skip all the NULL pointer checks, too.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2017-08-17 13:02 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 17:44 [00/14] can: cleanup of af_can/raw + simplifying of ndev->ml_priv handling Marc Kleine-Budde
2017-08-02 17:44 ` [PATCH 01/14] can: af_can: can_pernet_init(): add missing error handling for kzalloc returning NULL Marc Kleine-Budde
2017-08-24 12:42   ` Oliver Hartkopp
2017-08-25  8:31     ` Marc Kleine-Budde
2017-08-02 17:44 ` [PATCH 02/14] can: give structs holding the CAN statistics a sensible name Marc Kleine-Budde
2017-08-24 12:58   ` Oliver Hartkopp
2017-08-25 13:08     ` Marc Kleine-Budde
2017-08-25 17:32       ` Oliver Hartkopp
2017-08-28  7:25         ` Marc Kleine-Budde
2017-08-02 17:44 ` [PATCH 03/14] can: af_can: give struct holding the CAN per device receive lists " Marc Kleine-Budde
2017-08-24 12:59   ` Oliver Hartkopp
2017-08-28 10:58     ` Marc Kleine-Budde
2017-08-02 17:44 ` [PATCH 04/14] can: af_can: give variable " Marc Kleine-Budde
2017-08-24 13:03   ` Oliver Hartkopp
2017-08-28 13:39     ` Marc Kleine-Budde
2017-08-02 17:44 ` [PATCH 05/14] can: proc: " Marc Kleine-Budde
2017-08-24 13:05   ` Oliver Hartkopp
2017-08-02 17:44 ` [PATCH 06/14] can: af_can: rename find_rcv_list() to can_rcv_list_find() Marc Kleine-Budde
2017-08-24 13:11   ` Oliver Hartkopp
2017-08-28 11:53     ` Marc Kleine-Budde
2017-08-02 17:44 ` [PATCH 07/14] can: af_can: give variable holding the CAN receiver and the receiver list a sensible name Marc Kleine-Budde
2017-08-24 13:27   ` Oliver Hartkopp
2017-08-28 15:24     ` Marc Kleine-Budde
2017-08-02 17:44 ` [PATCH 08/14] can: af_can: can_rx_register(): use max() instead of open coding it Marc Kleine-Budde
2017-08-24 13:28   ` Oliver Hartkopp
2017-08-28 15:24     ` Marc Kleine-Budde
2017-08-02 17:44 ` [PATCH 09/14] can: raw: use struct sock::sk_bound_dev_if instead of struct raw_sock::ifindex Marc Kleine-Budde
2017-08-24 13:39   ` Oliver Hartkopp
2017-08-24 14:11     ` Kurt Van Dijck
2017-08-25  8:43       ` Oliver Hartkopp
2017-08-25  9:34         ` Kurt Van Dijck
2017-08-25 17:54           ` Oliver Hartkopp
2017-08-25 18:46             ` Kurt Van Dijck
2017-08-27 14:27               ` Oliver Hartkopp
2017-08-02 17:44 ` [PATCH 10/14] can: raw: raw_bind: bail out if can_family is not AF_CAN Marc Kleine-Budde
2017-08-24 13:40   ` Oliver Hartkopp
2017-08-28 15:25     ` Marc Kleine-Budde
2017-08-02 17:44 ` [PATCH 11/14] can: af_can: can_pernet_exit(): no need to iterate over and cleanup registered CAN devices Marc Kleine-Budde
2017-08-24 13:48   ` Oliver Hartkopp
2017-08-02 17:44 ` [PATCH 12/14] can: introduce CAN midlayer private and allocate it automatically Marc Kleine-Budde
2017-08-24 13:51   ` Oliver Hartkopp
2017-08-02 17:44 ` [PATCH 13/14] can: make use of preallocated can_ml_priv for per device struct can_dev_rcv_lists Marc Kleine-Budde
2017-08-24 13:55   ` Oliver Hartkopp
2017-08-02 17:44 ` [PATCH 14/14] can: af_can: remove NULL-ptr checks from users of can_dev_rcv_lists_find() Marc Kleine-Budde
2017-08-24 13:58   ` Oliver Hartkopp
2017-08-03  5:03 ` [00/14] can: cleanup of af_can/raw + simplifying of ndev->ml_priv handling Oliver Hartkopp
2017-08-03  7:39   ` Marc Kleine-Budde
2017-08-17 11:57   ` Marc Kleine-Budde
2017-08-17 12:57     ` Oliver Hartkopp
2017-08-17 13:02       ` Marc Kleine-Budde [this message]
2017-08-17 13:03         ` Marc Kleine-Budde
2017-08-17 13:06           ` Marc Kleine-Budde
2017-08-17 13:13             ` Oliver Hartkopp
2017-08-17 13:17               ` Marc Kleine-Budde
2017-08-17 13:54                 ` Oliver Hartkopp
2017-08-17 14:08                   ` Marc Kleine-Budde
2017-08-24 12:31                     ` Oliver Hartkopp
2017-08-17 13:08         ` Oliver Hartkopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d2b8653-1706-61de-6bb7-7198087dca20@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.