Search Linux Wireless

Re: [PATCH] backports: rename some mem functions to not break custom kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/08/2013 08:45 AM, Arik Nemtsov wrote:
> On Thu, Aug 8, 2013 at 2:00 AM, Hauke Mehrtens <hauke@xxxxxxxxxx> wrote:
>> Please add backports mailing list ( backports@xxxxxxxxxxxxxxx ) next time.
> 
> Ok. Thanks.
> 
> 
>>> diff --git a/backport/backport-include/asm/mtrr.h b/backport/backport-include/asm/mtrr.h
>>> index cf0f6fd..c5760b4 100644
>>> --- a/backport/backport-include/asm/mtrr.h
>>> +++ b/backport/backport-include/asm/mtrr.h
>>> @@ -7,14 +7,17 @@
>>>   * The following functions are for use by other drivers that cannot use
>>>   * arch_phys_wc_add and arch_phys_wc_del.
>>>   */
>>> +#ifndef phys_wc_to_mtrr_index
>>>  #ifdef CONFIG_MTRR
>>> -extern int phys_wc_to_mtrr_index(int handle);
>>> +extern int backport_phys_wc_to_mtrr_index(int handle);
>>>  #else
>>> -static inline int phys_wc_to_mtrr_index(int handle)
>>> +static inline int backport_phys_wc_to_mtrr_index(int handle)
>>>  {
>>>       return -1;
>>>  }
>>>  #endif /* CONFIG_MTRR */
>>> +#define phys_wc_to_mtrr_index LINUX_BACKPORT(phys_wc_to_mtrr_index)
>>
>> You should put this line before the #ifndef phy_.... and then you do not
>> have to use backport_phys_wc_to_mtrr_index with the prefix anywhere in
>> backports. This also applies for the other places where you manually add
>> backport_.
> 
> The case I'm trying to un-break here is one where the symbol is
> defined by the kernel, even though it's not supposed to. This can
> happen if someone cherry-picks patches containing this symbol into
> their kernel.
> The backported driver is better off using the kernel symbol in that
> case I guess?
> 
> Arik
Hi Arik,

adding the LINUX_BACKPORT() line should be enough to rename it
everywhere in backprots, so you do not have to modify
backport/compat/backport-3.11.c or manually add the prefix anywhere else.

Could you try if this fixes your problems with phys_wc_to_mtrr_index:

 ...
+#define phys_wc_to_mtrr_index LINUX_BACKPORT(phys_wc_to_mtrr_index)
 #ifdef CONFIG_MTRR
 extern int phys_wc_to_mtrr_index(int handle);
 #else
 static inline int phys_wc_to_mtrr_index(int handle)
 {
 	return -1;
 }
 #endif /* CONFIG_MTRR */

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux