lkml.org 
[lkml]   [2009]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH] Moorestown RAR Handler driver, MRST 2.6.31-rc3
Hi Sam,

>Please use:
>+ memrar-y := memrar_allocator.o memrar_handler.o
>
>The foo-objs syntax is deprecated.

Thanks! I'll make that change.

The file `Documentation/kbuild/makefiles.txt' doesn't mention the deprecation, AFAICT. Can you tell me where it is documented?

>> +
>> +
>> +#include "memrar_allocator.h"
>> +#include <linux/slab.h>
>> +#include <linux/bug.h>
>
><linux/...> comes _before_ you own includes.
>And an empty line in between.

Will do!

This guideline doesn't appear in Documentation/CodingStyle. Should it?

>> +
>> +
>> +struct memrar_allocator *memrar_create_allocator(unsigned long base,
>> + size_t capacity,
>> + size_t block_size)
>> +{
>> + struct memrar_allocator *allocator = 0;
>
>It is recommended to separate definition,
>and assignment.
>So this should look like this:
>
> struct memrar_allocator *allocator;
>
> allocator = 0;

Okay, I'll fix that, too. Should this go into Documentation/CodingStyle, too?

>> +
>> + /* Validate parameters. */
>> + if (/*
>> + * Make sure we can allocate the entire memory allocator
>> + * space.
>> + */
>> + ULONG_MAX - capacity >= base
>> +
>> + /* Zero capacity or block size are obviously invalid. */
>> + && capacity != 0
>> + && block_size != 0) {
>
>Very ugly way to comment your if (..) IMHO
>Put the comment abvoe the if.

You're not the only that has mentioned that :). I'll fix this in the next revision, as well.

>I'm short on time - so this is the comments for today...

Thanks a lot for the feedback, Sam! I'll address all of your comments in the next revision!

-Ossama


\
 
 \ /
  Last update: 2009-08-03 19:35    [W:0.106 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site