@@ -1523,27 +1523,27 @@ static void n_tty_lookahead_flow_ctrl(struct tty_struct *tty, const u8 *cp,
1523
1523
1524
1524
static void
1525
1525
n_tty_receive_buf_real_raw (const struct tty_struct * tty , const u8 * cp ,
1526
- int count )
1526
+ size_t count )
1527
1527
{
1528
1528
struct n_tty_data * ldata = tty -> disc_data ;
1529
1529
size_t n , head ;
1530
1530
1531
1531
head = MASK (ldata -> read_head );
1532
- n = min_t ( size_t , count , N_TTY_BUF_SIZE - head );
1532
+ n = min ( count , N_TTY_BUF_SIZE - head );
1533
1533
memcpy (read_buf_addr (ldata , head ), cp , n );
1534
1534
ldata -> read_head += n ;
1535
1535
cp += n ;
1536
1536
count -= n ;
1537
1537
1538
1538
head = MASK (ldata -> read_head );
1539
- n = min_t ( size_t , count , N_TTY_BUF_SIZE - head );
1539
+ n = min ( count , N_TTY_BUF_SIZE - head );
1540
1540
memcpy (read_buf_addr (ldata , head ), cp , n );
1541
1541
ldata -> read_head += n ;
1542
1542
}
1543
1543
1544
1544
static void
1545
1545
n_tty_receive_buf_raw (struct tty_struct * tty , const u8 * cp , const u8 * fp ,
1546
- int count )
1546
+ size_t count )
1547
1547
{
1548
1548
struct n_tty_data * ldata = tty -> disc_data ;
1549
1549
u8 flag = TTY_NORMAL ;
@@ -1560,7 +1560,7 @@ n_tty_receive_buf_raw(struct tty_struct *tty, const u8 *cp, const u8 *fp,
1560
1560
1561
1561
static void
1562
1562
n_tty_receive_buf_closing (struct tty_struct * tty , const u8 * cp , const u8 * fp ,
1563
- int count , bool lookahead_done )
1563
+ size_t count , bool lookahead_done )
1564
1564
{
1565
1565
u8 flag = TTY_NORMAL ;
1566
1566
@@ -1573,7 +1573,7 @@ n_tty_receive_buf_closing(struct tty_struct *tty, const u8 *cp, const u8 *fp,
1573
1573
}
1574
1574
1575
1575
static void n_tty_receive_buf_standard (struct tty_struct * tty , const u8 * cp ,
1576
- const u8 * fp , int count ,
1576
+ const u8 * fp , size_t count ,
1577
1577
bool lookahead_done )
1578
1578
{
1579
1579
struct n_tty_data * ldata = tty -> disc_data ;
@@ -1612,11 +1612,11 @@ static void n_tty_receive_buf_standard(struct tty_struct *tty, const u8 *cp,
1612
1612
}
1613
1613
1614
1614
static void __receive_buf (struct tty_struct * tty , const u8 * cp , const u8 * fp ,
1615
- int count )
1615
+ size_t count )
1616
1616
{
1617
1617
struct n_tty_data * ldata = tty -> disc_data ;
1618
1618
bool preops = I_ISTRIP (tty ) || (I_IUCLC (tty ) && L_IEXTEN (tty ));
1619
- size_t la_count = min_t ( size_t , ldata -> lookahead_count , count );
1619
+ size_t la_count = min ( ldata -> lookahead_count , count );
1620
1620
1621
1621
if (ldata -> real_raw )
1622
1622
n_tty_receive_buf_real_raw (tty , cp , count );
@@ -1687,11 +1687,11 @@ static void __receive_buf(struct tty_struct *tty, const u8 *cp, const u8 *fp,
1687
1687
*/
1688
1688
static size_t
1689
1689
n_tty_receive_buf_common (struct tty_struct * tty , const u8 * cp , const u8 * fp ,
1690
- int count , bool flow )
1690
+ size_t count , bool flow )
1691
1691
{
1692
1692
struct n_tty_data * ldata = tty -> disc_data ;
1693
- size_t rcvd = 0 ;
1694
- int room , n , overflow ;
1693
+ size_t n , rcvd = 0 ;
1694
+ int room , overflow ;
1695
1695
1696
1696
down_read (& tty -> termios_rwsem );
1697
1697
@@ -1724,7 +1724,7 @@ n_tty_receive_buf_common(struct tty_struct *tty, const u8 *cp, const u8 *fp,
1724
1724
} else
1725
1725
overflow = 0 ;
1726
1726
1727
- n = min ( count , room );
1727
+ n = min_t ( size_t , count , room );
1728
1728
if (!n )
1729
1729
break ;
1730
1730
@@ -1954,9 +1954,8 @@ static inline int input_available_p(const struct tty_struct *tty, int poll)
1954
1954
* caller holds non-exclusive %termios_rwsem;
1955
1955
* read_tail published
1956
1956
*/
1957
- static bool copy_from_read_buf (const struct tty_struct * tty ,
1958
- u8 * * kbp ,
1959
- size_t * nr )
1957
+ static bool copy_from_read_buf (const struct tty_struct * tty , u8 * * kbp ,
1958
+ size_t * nr )
1960
1959
1961
1960
{
1962
1961
struct n_tty_data * ldata = tty -> disc_data ;
@@ -2009,8 +2008,7 @@ static bool copy_from_read_buf(const struct tty_struct *tty,
2009
2008
* caller holds non-exclusive %termios_rwsem;
2010
2009
* read_tail published
2011
2010
*/
2012
- static bool canon_copy_from_read_buf (const struct tty_struct * tty ,
2013
- u8 * * kbp ,
2011
+ static bool canon_copy_from_read_buf (const struct tty_struct * tty , u8 * * kbp ,
2014
2012
size_t * nr )
2015
2013
{
2016
2014
struct n_tty_data * ldata = tty -> disc_data ;
0 commit comments